Mysql on leopard

Hi

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,

PJ.

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

Good luck,

-Conrad

Hi Conrad,

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

The steps i’ve followed are:

  1. sudo port install mysql5 +server
  2. sudo launchctl load -w /Library/LaunchDaemons/
    org.macports.mysql5.plist
  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
privileges.
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.

???

PJ.

Oops, sorry…

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

:slight_smile:

PJ.