0
votes

I installed mysql-5.1.63-osx10.6-x86_64 onto my Mac (OS X 10.7) - initially I managed to get MySql running and could create a new database. I had problems with root passwords and fiddled around with various files (can't trace back my changes now) having picked up tips on various sites. I then uninstalled and reinstalled MySql and now I can't get it to run. I continually get ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2). There is no /tmp/mysql.sock file.

Does anyone have any suggestions? Also is there a good source of reading so that I can learn how all the relevent parts of MySql work together so that I can really understand the installation?

I would be very grateful for any help and I am sure that more information will be needed to solve this so ask any questions needed!

THANK YOU :))))))

2
Check if your current user have the permission to access mysql files.If not, change the owner of mysql folder. Hope it helps.Michael

2 Answers

1
votes

I just come across the same problem on mac OS.

1.if you install mysql by brew, input

brew info mysql

in terminal to find your answer in the message shown.

2.else if you install mysql by official dmg, just like me. And actually it can be easy: Open "system preferences", you will find a icon if you install mysql from dmg. click "mysql" and find the button-- "start mysql".

From the activity monitor, you can find it actually start well. "mysql" in my terminal still not work. However, it's another problem and I'am going to figure it out....

0
votes

I had the same problem, and in my case I didn't had mysql running. Go to system preferences, mysql and click on "Start MySQL Server"