`
PBFox
  • 浏览: 66074 次
  • 性别: Icon_minigender_1
  • 来自: China
文章分类
社区版块
存档分类
最新评论

linux mysql 安装后使用的问题

阅读更多
在linux上把mysql 重新装了一下,装好了后怎么也启动不了,老是报can't connect to local mysql server through socket ' var lib mysql mysql.sock' 2的错误,google了一下,解决的方法到是不少,可试了以后就是不行。操作操作又报couldn't find manager or server错误。继续google,看了一个解决方法,于是就试了一下,还真的行了。
记下来:
[root@server ~]# /etc/init.d/mysql start
Starting MySQL..Couldn't find MySQL manager or server

or this error may display in WHM:
Can't connect to local mysql through socket /var/lib/mysql/mysql.sock

Apparently some RPM packages install this file with an incorrect path in the my.cnf file by default, leaving the service unable to start on its own. To fix, simply open /etc/my.cnf in vi and comment out the 'basedir=/var/lib' line like so:
#basedir=/var/lib

Save the file, and restart MySQL (/etc/init.d/mysql restart).
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics