Linux 使用yum install安装mysql登陆不上解决办法

CentOS yum安装mysql后 Can’t connect to local MySQL server through socket ‘/var/lib/

 

CentOS Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’

如果仅仅只yum 安装了mysql这个包,启动mysql时就会提示:
ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’

yum安装mysql这个包其实是MySQL 客户端程序和共享库,所以我们还需要安装php-mysql和mysql-server这两个包.

 

 

[root@localhost ~] yum install mysql mysql-server php-mysql -y
[root@localhost ~] chkconfig mysqld on
[root@localhost ~] service mysqld start
[root@localhost ~] service httpd restart

Linux 使用yum install安装mysql登陆不上解决办法,布布扣,bubuko.com

Linux 使用yum install安装mysql登陆不上解决办法

上一篇:常用redis配置(配置文件中)


下一篇:1.初始stl--vector