当前位置: 代码迷 >> Ruby/Rails >> error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (二)'
  详细解决方案

error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (二)'

热度:175   发布时间:2016-04-29 02:22:38.0
error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)'
 [[email protected] ~]#   /usr/bin/mysqladmin -u root password 'aaaaaa'
/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists!
解决:
1》/etc/rc.d/init.d/mysqld status 看看mysql是否已经启动
2》service mysqld start
  相关解决方案