CentOS下使用yum 安装mysql

在启动的时候会报这个错误

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

 

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

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

相关文章:

  • 2021-04-02
  • 2021-10-31
  • 2021-12-11
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-06
  • 2022-02-08
  • 2022-12-23
  • 2021-06-11
相关资源
相似解决方案