[ACCEPTED]-How to connect MySQL workbench with MAMP PRO?-mamp
Change the connection type from TCP/IP
to Local
, then 2 point it to the socket:
/Applications/MAMP/tmp/mysql/mysql.sock
Your username and 1 pw will most likely be root / root
As Mike said you can use the Local option and 5 point it to the socket:
/Applications/MAMP/tmp/mysql/mysql.sock
Or you can generate 4 a symbolic link to your mysql socket (from 3 your terminal):
sudo ln -s /Applications/MAMP/tmp/mysql/mysql.sock /tmp/
Doing it this way the changes will be permanent and you 2 will be able to connect to mysql using the 1 mysqlcli
or any other external tool.
I was able to get http://www.sequelpro.com/ working by pointing it 1 to the socket: /Applications/MAMP/tmp/mysql/mysql.sock
After looking around for quite some time, Mike's 11 answer worked great.
However, I also discovered 10 that going into MySQL tab and checking Allow network access to MySQL
and 9 choosing the only from this Mac
radio button I was able to 8 connect using the previously saved connection 7 in MySQL Workbench that I had been using 6 with standard MAMP before upgrading to MAMP 5 Pro.
So for those of you who are moving from 4 MAMP to MAMP Pro and already have your connections 3 setup in MySQL Workbench, this option is 2 quicker than setting up a new connection 1 using a unix socket.
I had the same problem and fixed it by unchecking 2 the "Allow local access only" checkbox in 1 the Server->MySQL Tab
In my case the problem was the ports. As 4 well explained here, the default mysql port 3 in MAMP is 8889, and not 3306, although 2 in MAMP localhost website says that it`s 1 running in 3306.
I'm only able to connect if I use the socket 2 /Applications/MAMP/tmp/mysql/mysql.sock
AND set "Run Apache/MySQL as user www/mysql
" in 1 the gerneral tab.
If, after following Mike's answer you receive:
Operation failed: /usr/local/mysql/support-files/mysql.server start is invalid
Follow 2 the instructions here. For me, I had to replace 1 /usr/local/mysql with /Application/MAMP/Library in the fields:
- Start MySQL:
- Stop MySQL:
- Check MySQL Status:
When I have to make this connection, I set 8 my TCP/IP connection to socket and UN/pw 7 both to root as Mike suggests above. However 6 workbench was still telling me that it was 5 looking for a cnf file at this location 4 (/etc/my.cnf).
I created a symlink from my 3 MAMP cnf file to the location that Workbench 2 was looking for it. (sudo ln -s /Applications/MAMP/Library/support-files/my.cnf 1 /etc/my.cnf)
setup finalized without issue.
Make sure MySQL is set to "on" in addition 3 to Apache or nginx. The Servers
button may not 2 toggle all of them.
In my case, only Apache 1 was running :)
More Related questions
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.