MySql安装后写命令提示 Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
高洛峰2017-04-17 11:31:29
0
3
677
从官方渠道下载了MySQL-server-5.5.37-1.linux2.6.x86_64.rpm
通过rpm -ivh命令安装,安装在安装目录下后写命令mysql -uroot
提示 Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
問題解決。
ps aux | grep mysql
/var/log
下我想大半是mysql-server沒啟動成功
設定檔中客戶端和服務端所使用的sock路徑應該一致