开发者

Mysql error from macports: missing mysqld.sock

开发者 https://www.devze.com 2023-03-26 21:23 出处:网络
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/

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开发者_C百科 (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?


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


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
0

精彩评论

暂无评论...
验证码 换一张
取 消