My main reason for using MySQL Workbench, at least for now, is for the really cool Data Modeling tools.
It a bit of a pain to MySQL Workbench up for MAMP, though. To set mySQL workbench up for MAMP, I found the following to work after scouring the internet and finding this simple to the point post at chrischarlton.us. I am sharing it again in this post to make finding help a bit easier for myself and others.
In the right side pane of the Front panel click “New Server Instance”.
The choose “localhost” and click Continue.
Even if the “Testing the Database Connection” tests all fail, click Continue.
The for Operating System & MySQL Package: Choose “Mac OS X”.
For the Testing Host Machine Settings: Even if the tests all fail, again, click Continue.
Check the “Change Parameters” checkbox and click Continue.
Update – the path to Configuration File: /Applications/MAMP/tmp/mysql/mysql.sock,
Note that both click “Check Path” then click “Check Name” – should pass.
here are the commands to start & stop MySQL respectively:
start: /Applications/MAMP/bin/startMysql.sh
stop: /Applications/MAMP/bin/stopMysql.sh
You may or may not need to check the elevated privileges checkbox.
Server Instance Name: MAMP@localhost (or whatever you want)
Im not sure why, exactly, but I had to do this a few times before I could get it to work. You may also need to restart your MAMP server. I hope this helps.
Hello,
Thanks for the article, it has worked well for me up to a point. I now have a slight stumbling block.
I am using MySQL Workbench 6.0 and MAMP 3.0.3.
I do not have the following file: /Applications/MAMP/tmp/mysql/mysql.sock
I have searched for it in my computer and it can not be found.
I do have the files: /Applications/MAMP/bin/startMysql.sh
/Applications/MAMP/bin/stopMysql.sh
Do you know why I might not have the mysql.sock file, and what I should do to solve this problem?
Thanks
Hi Conor,
I’m not sure if this will do the trick, but here is something I tried once and worked well.
Edit the MAMP start and stop scripts so the mysql.sock location is the default. This can be done by editing the following files:
/Applications/MAMP/bin/startMysql.sh
/Applications/MAMP/bin/stopMysql.sh
Replace
socket=/Applications/MAMP/tmp/mysql/mysql.sock
with
socket=/tmp/mysql.sock
A temporary solution is to open up a terminal window and execute the following:
sudo ln -s /Applications/MAMP/tmp/mysql/mysql.sock /tmp/mysql.sock
This will create a symbolic link to the MAMP socket file from the normal socket file location. This link will go away when MAMP is stopped or your machine is restarted.