最近两日,由于新迁的mysql总是出现问题,导致项目系统无法连接数据库或者总是断连,致使项目无法进行,经过排查多方面原因,最终找到问题所在:
首先是出现的问题:
[ERROR] Fatal error: Can’t open and lock privilege tables: Table ‘mysql.user’ doesn’t exist
[ERROR] Fatal error: Failed to initialize ACL/grant/time zones structures or failed to remove temporary table files.
[ERROR] Can’t open the mysql.plugin table. Please run mysql_upgrade to create it.
[ERROR] Fatal error: Can’t open and lock privilege tables: Table ‘mysql.user’ doesn’t exist
[ERROR] Fatal error: Failed to initialize ACL/grant/time zones structures or failed to remove temporary table files.
针对以上几个问题,我查过很多资料,但是都没有解决,感觉差的东西太多了,于是索性重装mysql,在官网上下载安装包https://cdn.mysql.com//Downloads/MySQL-5.7/mysql-5.7.29-1.el7.x86_64.rpm-bundle.tar
使用tar命令解压tar -xvf mysql