systemctl start mysqld启动MySQL报错

Job for mysqld.service failed. See  systemctl status mysqld.service  and  journalctl -xn  for details.

然后查看错误日志

cat /var/log/mysqld.log | grep ERROR    #只查看具体的报错日志,省略了其他类型的日志

Can t open the mysql.plugin table. Please run mysql_upgrade to create it. 

问题解决方法

rm -rf /var/lib/mysql/*
mysqld --initialize --user=mysql --datadir=/var/lib/mysql
 
systemctl restart mysqld
systemctl status mysqld

Logo

一站式 AI 云服务平台

更多推荐