In MAMP PRO, after you set host to 127.0.0.1 and if still not working, then you have to enable the Allow network access to MySQL on MAMP PRO MySQL options
In MAMP PRO, after you set host to 127.0.0.1 and if still not working, then you have to enable the Allow network access to MySQL on MAMP PRO MySQL options