After restarting the server, Can't find file: './mysql/plugin.frm' and Unknown table engine 'InnoDB'

      The kettle running batch of log analysis slowed down for no reason, and the problem was not solved after analyzing various situations. I decided to restart the server. After restarting the server, I found that the above mysql database could not be started. The prompt is as follows:   /usr/libexec/mysqld: Can't find file: './mysql/plugin.frm' (errno: 13)

110222 11:15:07 mysqld_safe Starting mysqld daemon with databases from /home/mysql
110222 11:15:07 [Warning] Can't create test file /home/mysql/localhost.lower-test
110222 11:15:07 [Warning] Can't create test file /home/mysql/localhost.lower-test
 /usr/libexec/mysqld: Can't find file: './mysql/plugin.frm' (errno: 13)
110222 11:15:07 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
110222 11:15:07  InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'open'.
InnoDB: Cannot continue operation.
110222 11:15:07 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

 The solution is as follows:

#Enter the following line in the terminal

chown -R mysql:mysql /home/data/mysql #Enter
the following line and it will be OK

chcon -R -t mysqld_db_t /home/mysql

#Restart MYSQL and try~

 

     Restarting mysql is OK, but when accessing the database table, it prompts: Unknown table engine 'InnoDB', I have used various methods on the Internet, and modified my.cnf N times, but it has not been solved. Finally , setenforce 0 is turned off on the firewall , and the data can be accessed normally.

     Baidu a bit, still do not understand what is the relationship between firewall and innodb? Document the problem and provide a solution for those who encounter this problem later.

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326489293&siteId=291194637