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
成功!!