locoboy
locoboy

Reputation: 38940

Mysql error from macports: missing mysqld.sock

I ran the following in the terminal:

sudo port install py26-mysql 
sudo port install mysql5-server

It seems to have downloaded and installed properly, but when I try to open mysql using /opt/local/lib/mysql5/bin/mysql I get the following error:

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

Does anyone know what's gone wrong?

Upvotes: 2

Views: 3026

Answers (2)

Freeman
Freeman

Reputation: 6216

You have to add to /opt/local/etc/mysql57/my.cnf the following configuration:

[client]
socket=/opt/local/var/run/mysql57/mysqld.sock

[mysqld]
socket=/opt/local/var/run/mysql57/mysqld.sock

Upvotes: 0

Ned Deily
Ned Deily

Reputation: 85045

Did you activate the MySQL server? See the instructions under Step 3: Install MySQL.

Upvotes: 2

Related Questions