无法通过套接字tmp/mysql.sock连接到本地MySQL服务器
问题描述:
刚刚尝试在终端(flush_hosts)中访问某些mysqladmin特权,我注意到套接字问题已因错误而浮出水面
Having just tried to access some mysqladmin privileges within terminal (flush_hosts), I have noticed that the socket problem has resurfaced with the error
无法通过套接字'/tmp/mysql.sock'(2)*连接到本地MySQL服务器.
Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)*.
我目前没有服务器在运行.
I have no servers running currently.
如何解决?
答
请尝试删除database.yml
文件中的套接字字段,或者如果知道计算机中的位置,请使用正确的路径将其更改为mysql.sock
.
try removing socket field in the database.yml
file or change it with the right path to mysql.sock
if you know where it is in you machine.