I am not able to start MySQL server on Mac OS X 10.4.11. MySQL was installed using Macports. MySQL was running fine until it suddenly died without any obvious reason.

When running "mysql", I get the error message:

ERROR 2002 (HY000): Can't connect to local MySQL server through 
socket '/opt/local/var/run/mysql5/mysqld.sock' (2)

If I try to start MySQL manually, I get the following error message:

sudo /opt/local/share/mysql5/mysql/mysql.server start
Starting MySQL/opt/local/share/mysql5/mysql/mysql.server: line
159: kill: (636) - No such process

In /etc/mysql/my.cnf I have:

socket = __PREFIX/var/run/mysqld/mysqld.sock

But the path "opt/local/var/run/mysqld/" does not exist on my system.

I tried to change the socket path to "__PREFIX/var/run/mysql5/ mysqld.sock" (which is where the socket is located). Unfortunately, this did not help either.

Owner and Permissions for /opt/local/var/run/mysql5/ are correctly set.

Any suggestions on how to start MySQL again? Thanks for your advice.


take dmg from mysql.com, and start it from pref pane


As frx said, you can download the official distribution for MySQL rather than installing it through ports.

You can also use the wonderfully simple MAMP application to get a MySQL, PHP, and Apache installation all in a neat little self-contained application bundle.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy