MySql安装后写命令提示 Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
高洛峰2017-04-17 11:31:29
0
3
678
从官方渠道下载了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)
问题解决.
http://stackoverflow.com/questions/21103197/cant-connect-to-local-mysql-server-through-socket-var-lib-mysql-mysql-sock
ps aux | grep mysql
/var/log
下我想大半是mysql-server没启动成功
配置文件中客户端和服务端使用的sock路径应该一致