Mysql on leopard


I have installed Mysql on Leopard with Macports.

I have it working ok, but whenever i reboot my computer, the /tmp/
mysql.sock file gets deleted.

Does anyone know how i can stop this from happening???

Many thanks,


Hi PJ, you should not ever store anything in /tmp if you would like it
persist between system reboots. BTW, I have also used MacPorts to
MySQL and the socket file is located in the following location:

Good luck,


Hi Conrad,

I’ve been reading some instructions about how to install mysql with

The steps i’ve followed are:

  1. sudo port install mysql5 +server
  2. sudo launchctl load -w /Library/LaunchDaemons/
  3. sudo mysql_install_db5 --user=mysql
  4. cd /opt/local ; sudo /opt/local/lib/mysql5/bin/mysqld_safe &

With these steps i am able to connect to mysql from the Terminal
command line.

However, when i try to connect with CocoaMySQL, I get this error:

Unable to connect to host localhost.
Be sure that the address is correct and that you have the necessary
MySQL said: Can’t connect to local MySQL server through socket ‘/tmp/
mysql.sock’ (2)

I can only connect to MySQL from CocoaMySQL when I create a sym link:

sudo ln -s /opt/local/var/run/mysql5/mysqld.sock /tmp/mysql.sock

But this /tmp/mysql.sock file is getting deleted when i reboot.

So i guess the problem seems to be with CocoaMySQL. On trying to
connect, I’ve entered the socket location as /opt/local/var/run/mysql5/
mysqld.sock - but that does not work either.



Oops, sorry…

I just tried entering the socket in Cocoa again(correctly) - and it’s



This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs