Mysql 5.7.20 服务在 RedHat 6.5 上启动失败

Mysql 5.7.20 服务在 RedHat 6.5 上启动失败

我已经安装了 mysql 5.7.20,但不幸的service mysqld start是一直失败。

/var/log/mysqld.log文件有以下行:

2018-01-08T08:24:07.097304Z 0 [ERROR] Fatal error: mysql.user table is damaged. Please run mysql_upgrade.

但是,mysql_upgrade命令返回错误Can't connect to local MySQL server through socket,因为 mysql 服务未运行。
我尝试添加,innodb_force_recovery = 1/etc/my.cnf没有帮助。

满的mysqld.log

2018-01-08T08:24:06.758328Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2018-01-08T08:24:06.759173Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.20) starting as process 16375 ...
2018-01-08T08:24:06.763658Z 0 [Note] InnoDB: PUNCH HOLE support available
2018-01-08T08:24:06.763677Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2018-01-08T08:24:06.763684Z 0 [Note] InnoDB: Uses event mutexes
2018-01-08T08:24:06.763688Z 0 [Note] InnoDB: GCC builtin __sync_synchronize() is used for memory barrier
2018-01-08T08:24:06.763692Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
2018-01-08T08:24:06.763705Z 0 [Note] InnoDB: Using Linux native AIO
2018-01-08T08:24:06.763931Z 0 [Note] InnoDB: Number of pools: 1
2018-01-08T08:24:06.764023Z 0 [Note] InnoDB: Using CPU crc32 instructions
2018-01-08T08:24:06.765184Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2018-01-08T08:24:06.772431Z 0 [Note] InnoDB: Completed initialization of buffer pool
2018-01-08T08:24:06.774033Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2018-01-08T08:24:06.785525Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2018-01-08T08:24:06.943031Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2018-01-08T08:24:06.943086Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2018-01-08T08:24:07.039164Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2018-01-08T08:24:07.039921Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2018-01-08T08:24:07.039934Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2018-01-08T08:24:07.040559Z 0 [Note] InnoDB: Waiting for purge to start
2018-01-08T08:24:07.090723Z 0 [Note] InnoDB: 5.7.20 started; log sequence number 1205043
2018-01-08T08:24:07.091150Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2018-01-08T08:24:07.091346Z 0 [Note] InnoDB: Buffer pool(s) load completed at 180108  0:24:07
2018-01-08T08:24:07.091427Z 0 [Note] Plugin 'FEDERATED' is disabled.
2018-01-08T08:24:07.093950Z 0 [Warning] System table 'plugin' is expected to be transactional.
2018-01-08T08:24:07.094400Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2018-01-08T08:24:07.094464Z 0 [Warning] Failed to set up SSL because of the following SSL library error: SSL context is not usable without certificate and private key
2018-01-08T08:24:07.094598Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
2018-01-08T08:24:07.094649Z 0 [Note] IPv6 is available.
2018-01-08T08:24:07.094658Z 0 [Note]   - '::' resolves to '::';
2018-01-08T08:24:07.094675Z 0 [Note] Server socket created on IP: '::'.
2018-01-08T08:24:07.096960Z 0 [Warning] Failed to open optimizer cost constant tables

2018-01-08T08:24:07.097304Z 0 [ERROR] Fatal error: mysql.user table is damaged. Please run mysql_upgrade.
2018-01-08T08:24:07.097366Z 0 [ERROR] Aborting

2018-01-08T08:24:07.097395Z 0 [Note] Binlog end
2018-01-08T08:24:07.097444Z 0 [Note] Shutting down plugin 'ngram'
2018-01-08T08:24:07.097451Z 0 [Note] Shutting down plugin 'BLACKHOLE'
2018-01-08T08:24:07.097456Z 0 [Note] Shutting down plugin 'partition'
2018-01-08T08:24:07.097459Z 0 [Note] Shutting down plugin 'ARCHIVE'
2018-01-08T08:24:07.097462Z 0 [Note] Shutting down plugin 'MyISAM'
2018-01-08T08:24:07.097468Z 0 [Note] Shutting down plugin 'CSV'
2018-01-08T08:24:07.097473Z 0 [Note] Shutting down plugin 'INNODB_SYS_VIRTUAL'
2018-01-08T08:24:07.097476Z 0 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
2018-01-08T08:24:07.097479Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
2018-01-08T08:24:07.097482Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
2018-01-08T08:24:07.097485Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
2018-01-08T08:24:07.097488Z 0 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
2018-01-08T08:24:07.097491Z 0 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
2018-01-08T08:24:07.097493Z 0 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
2018-01-08T08:24:07.097496Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
2018-01-08T08:24:07.097499Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
2018-01-08T08:24:07.097502Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
2018-01-08T08:24:07.097504Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
2018-01-08T08:24:07.097507Z 0 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
2018-01-08T08:24:07.097510Z 0 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
2018-01-08T08:24:07.097517Z 0 [Note] Shutting down plugin 'INNODB_FT_DELETED'
2018-01-08T08:24:07.097520Z 0 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
2018-01-08T08:24:07.097523Z 0 [Note] Shutting down plugin 'INNODB_METRICS'
2018-01-08T08:24:07.097525Z 0 [Note] Shutting down plugin 'INNODB_TEMP_TABLE_INFO'
2018-01-08T08:24:07.097528Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
2018-01-08T08:24:07.097531Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
2018-01-08T08:24:07.097533Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
2018-01-08T08:24:07.097536Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
2018-01-08T08:24:07.097539Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
2018-01-08T08:24:07.097541Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
2018-01-08T08:24:07.097544Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM'
2018-01-08T08:24:07.097547Z 0 [Note] Shutting down plugin 'INNODB_CMP_RESET'
2018-01-08T08:24:07.097550Z 0 [Note] Shutting down plugin 'INNODB_CMP'
2018-01-08T08:24:07.097552Z 0 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
2018-01-08T08:24:07.097555Z 0 [Note] Shutting down plugin 'INNODB_LOCKS'
2018-01-08T08:24:07.097558Z 0 [Note] Shutting down plugin 'INNODB_TRX'
2018-01-08T08:24:07.097561Z 0 [Note] Shutting down plugin 'InnoDB'
2018-01-08T08:24:07.097619Z 0 [Note] InnoDB: FTS optimize thread exiting.
2018-01-08T08:24:07.097891Z 0 [Note] InnoDB: Starting shutdown...
2018-01-08T08:24:07.198094Z 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
2018-01-08T08:24:07.198263Z 0 [Note] InnoDB: Buffer pool(s) dump completed at 180108  0:24:07
2018-01-08T08:24:08.912682Z 0 [Note] InnoDB: Shutdown completed; log sequence number 1205062
2018-01-08T08:24:08.914621Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2018-01-08T08:24:08.914636Z 0 [Note] Shutting down plugin 'MEMORY'
2018-01-08T08:24:08.914643Z 0 [Note] Shutting down plugin 'MRG_MYISAM'
2018-01-08T08:24:08.914648Z 0 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
2018-01-08T08:24:08.914706Z 0 [Note] Shutting down plugin 'sha256_password'
2018-01-08T08:24:08.914710Z 0 [Note] Shutting down plugin 'mysql_native_password'
2018-01-08T08:24:08.914852Z 0 [Note] Shutting down plugin 'binlog'
2018-01-08T08:24:08.914979Z 0 [Note] /usr/sbin/mysqld: Shutdown complete

我该如何修复这个问题?我找不到任何相关的解决方案,日志没有告诉我任何关于谷歌的信息。

相关内容