yum install mysql-server安装mysql后

mysql -uroot -p123456启动

出现错误:ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock

进入/tmp/ 没有发现这个文件

mysql默认为空密码,难道密码不对?

设置密码mysqladmin -u root password '123456'

出现错误:mysqladmin: connect to server at 'localhost' failed

      error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111)'

网上找了一下解决方法

chown -R mysql:mysql /var/lib/mysql

/etc/rc.d/init.d/mysqld start

就可以了

相关文章:

  • 2022-12-23
  • 2022-02-24
  • 2021-05-19
  • 2021-12-21
  • 2022-01-17
猜你喜欢
  • 2021-08-08
  • 2021-05-21
  • 2022-12-23
  • 2022-12-23
  • 2021-10-20
  • 2021-07-30
  • 2022-12-23
相关资源
相似解决方案