Centos 下启动mysql 报错: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)解决方法
时间:2021-07-05 17:35:04
收藏:0
阅读:0
1、启动服务
systemctl restart mysqld.service
报错:
启动数据库Can‘t connect to MYSQL server through socket ‘‘var/lib/mysql/mysql.cock(146 lock timed out:Retry transaction)
2、解决办法
cd /var/lib/mysql #备份mysql.sock sudo mv mysql.sock mysql.sock.bak
再次登录
mysql -uroot -proot
成功!!
评论(0)