1 error: log-error set to '/u01/data/mydb/3306/error/3306.err'
錯誤描述:
[root@strong ~]# service mysqld start
Starting MySQL.2019-05-12T09:39:38.619861Z mysqld_safe error: log-error set to '/u01/data/mydb/3306/error/3306.err', however file don't exists. Create writable for user 'mysql'.
ERROR! The server quit without updating PID file (/u01/data/mydb/3306/db/strong.oracle.com.pid).
解決:
[root@strong ~]# touch /u01/data/mydb/3306/error/3306.err
[root@strong ~]# chown mysql:mysql /u01/data/mydb/3306/error/3306.err
2 [ERROR] InnoDB: The Auto-extending innodb_system data file '/u01/data/mydb/3306/ibdata/ibdata1' is of a different size 768 pages (rounded down to MB) than specified in the .cnf file
錯誤描述:
2019-05-12T09:59:56.929556Z 0 [ERROR] InnoDB: The Auto-extending innodb_system data file '/u01/data/mydb/3306/ibdata/ibdata1' is of a dif
ferent size 768 pages (rounded down to MB) than specified in the .cnf file: initial 1536 pages, max 0 (relevant if non-zero) pages!
2019-05-12T09:59:56.929883Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2019-05-12T09:59:57.537660Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2019-05-12T09:59:57.537964Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2019-05-12T09:59:57.537985Z 0 [ERROR] Failed to initialize builtin plugins.
2019-05-12T09:59:57.537996Z 0 [ERROR] Aborting
解決:
出現這個錯誤的原因是ibdata1的大小和my.cnf中配置的不一致導致,將配置文件的該文件的大小改為和真實的文件大小一致即可。
[root@strong ~]# ll -h /u01/data/mydb/3306/ibdata/ibdata1
-rw-r-----. 1 mysql mysql 12M May 12 17:56 /u01/data/mydb/3306/ibdata/ibdata1
3 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist
錯誤描述:
2019-05-12T10:07:34.841161Z 0 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist
2019-05-12T10:07:34.841196Z 0 [ERROR] Fatal error: Failed to initialize ACL/grant/time zones structures or failed to remove temporary table files.
2019-05-12T10:07:34.841275Z 0 [ERROR] Aborting
解決:
出現這個錯誤的原因是配置文件的datadir設置有誤,導致不能找到mysql數據庫下的user表,修改配置即可。
datadir=/u01/data/mydb/3306/db
