Can't connect to local MySQL server through socket /var/lib/mysql/mysql.sock问题解决

  首先这个问题往往是由于mysqld服务未开启,

  1、先查看 /etc/rc.d/init.d/mysqld status,如果未开启,那么用service mysqld start。也有可能是权限的问题,导致服务不能运行。
  2、如果mysqld在运行出现的这个问题,那么确定mysql.sock是不是在那个位置,然后试试,
mysql -u mysql用户名 -p -S /var/lib/mysql/mysql.sock


草原战狼淘宝小店:http://xarxf.taobao.com/ 淘宝搜小矮人鞋坊,主营精致美丽时尚女鞋,为您的白雪公主挑一双哦。
posted @ 2013-03-11 16:04  草原战狼  阅读(289)  评论(0编辑  收藏  举报
草原战狼淘宝小店

No one indebted for others,while many people don't know how to cherish others.

No one indebted for others,while many people don't know how to cherish others.

Don‘t cry because it is over, smile because it happened.

Don‘t try so hard, the best things come when you least expect them to.