How to connect MySQL workbench with MAMP PRO?
Question
What is the fix to connect the MySQL Workbench tool with the MAMP PRO MySQL database?
Solution 3
I was able to get http://www.sequelpro.com/ working by pointing it to the socket: /Applications/MAMP/tmp/mysql/mysql.sock
OTHER TIPS
Change the connection type from TCP/IP
to Local
, then point it to the socket:
/Applications/MAMP/tmp/mysql/mysql.sock
Your username and pw will most likely be root / root
As Mike said you can use the Local option and point it to the socket:
/Applications/MAMP/tmp/mysql/mysql.sock
Or you can generate a symbolic link to your mysql socket (from your terminal):
sudo ln -s /Applications/MAMP/tmp/mysql/mysql.sock /tmp/
Doing it this way the changes will be permanent and you will be able to connect to mysql using the mysqlcli
or any other external tool.
After looking around for quite some time, Mike's answer worked great.
However, I also discovered that going into MySQL tab and checking "Allow network access to MySQL" and choosing the "only from this Mac" radio button I was able to connect using the previously saved connection in MySQL Workbench that I had been using with standard MAMP before upgrading to MAMP Pro.
So for those of you who are moving from MAMP to MAMP Pro and already have your connections setup in MySQL Workbench, this option is quicker than setting up a new connection using a unix socket.
I had the same problem and fixed it by unchecking the "Allow local access only" checkbox in the Server->MySQL Tab
I'm only able to connect if I use the socket /Applications/MAMP/tmp/mysql/mysql.sock
AND set "Run Apache/MySQL as user www/mysql
" in the gerneral tab.
When I have to make this connection, I set my TCP/IP connection to socket and UN/pw both to root as Mike suggests above. However workbench was still telling me that it was looking for a cnf file at this location (/etc/my.cnf).
I created a symlink from my MAMP cnf file to the location that Workbench was looking for it. (sudo ln -s /Applications/MAMP/Library/support-files/my.cnf /etc/my.cnf)
setup finalized without issue.
Make sure MySQL is set to "on" in addition to Apache or nginx. The Servers
button may not toggle all of them.
In my case, only Apache was running :)
In my case the problem was the ports. As well explained here, the default mysql port in MAMP is 8889, and not 3306, although in MAMP localhost website says that it`s running in 3306.