mysql - 错误: while trying to restart mysql

标签 mysql centos

我正在尝试重新启动 mysql 服务,但是以下错误日志让我感到不安。 帮助我摆脱困境... 这是配置文件.. my.cnf:

[mysqld]
bind-address = 0.0.0.0
#server-id = 2
#master-host=192.168.10.110
#master-connect-retry=60
#master-user=slave
#master-password=slave
#replicate-do-db=repltest
max_connections=500
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql

symbolic-links=0

这里我附上了日志文件详细信息... 日志文件:

2016-04-28T06:13:45.032226Z 0 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
2016-04-28T06:13:45.032454Z 0 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
2016-04-28T06:13:45.032669Z 0 [Note] Server socket created on IP: '0.0.0.0'.
2016-04-28T06:13:45.088670Z 0 [ERROR] Fatal error: mysql.user table is damaged. Please run mysql_upgrade.
2016-04-28T06:13:45.088806Z 0 [ERROR] Aborting

2016-04-28T06:13:45.088828Z 0 [Note] Binlog end
2016-04-28T06:13:45.088935Z 0 [Note] Shutting down plugin 'ngram'
2016-04-28T06:13:45.088951Z 0 [Note] Shutting down plugin 'partition'
2016-04-28T06:13:45.088960Z 0 [Note] Shutting down plugin 'BLACKHOLE'
2016-04-28T06:13:45.088968Z 0 [Note] Shutting down plugin 'ARCHIVE'
2016-04-28T06:13:45.088984Z 0 [Note] Shutting down plugin 'MRG_MYISAM'
2016-04-28T06:13:45.088993Z 0 [Note] Shutting down plugin 'INNODB_SYS_VIRTUAL'
2016-04-28T06:13:45.089001Z 0 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
2016-04-28T06:13:45.089007Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
2016-04-28T06:13:45.089013Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
2016-04-28T06:13:45.089019Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
2016-04-28T06:13:45.089025Z 0 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
2016-04-28T06:13:45.089030Z 0 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
2016-04-28T06:13:45.089036Z 0 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
2016-04-28T06:13:45.089042Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
2016-04-28T06:13:45.089048Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
2016-04-28T06:13:45.089054Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
2016-04-28T06:13:45.089060Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
2016-04-28T06:13:45.089065Z 0 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
2016-04-28T06:13:45.089071Z 0 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
2016-04-28T06:13:45.089077Z 0 [Note] Shutting down plugin 'INNODB_FT_DELETED'
2016-04-28T06:13:45.089083Z 0 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
2016-04-28T06:13:45.089088Z 0 [Note] Shutting down plugin 'INNODB_METRICS'
2016-04-28T06:13:45.089094Z 0 [Note] Shutting down plugin 'INNODB_TEMP_TABLE_INFO'
2016-04-28T06:13:45.089100Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
2016-04-28T06:13:45.089105Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
2016-04-28T06:13:45.089111Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
2016-04-28T06:13:45.089117Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
2016-04-28T06:13:45.089122Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
2016-04-28T06:13:45.089128Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
2016-04-28T06:13:45.089134Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM'
2016-04-28T06:13:45.089140Z 0 [Note] Shutting down plugin 'INNODB_CMP_RESET'
2016-04-28T06:13:45.089146Z 0 [Note] Shutting down plugin 'INNODB_CMP'
2016-04-28T06:13:45.089151Z 0 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
2016-04-28T06:13:45.089157Z 0 [Note] Shutting down plugin 'INNODB_LOCKS'
2016-04-28T06:13:45.089163Z 0 [Note] Shutting down plugin 'INNODB_TRX'
2016-04-28T06:13:45.089169Z 0 [Note] Shutting down plugin 'InnoDB'
2016-04-28T06:13:45.089256Z 0 [Note] InnoDB: FTS optimize thread exiting.
2016-04-28T06:13:45.089373Z 0 [Note] InnoDB: Starting shutdown...
2016-04-28T06:13:45.189628Z 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
2016-04-28T06:13:45.189978Z 0 [Note] InnoDB: Buffer pool(s) dump completed at 160428 11:43:45
2016-04-28T06:13:46.934177Z 0 [Note] InnoDB: Shutdown completed; log sequence number 49822303
2016-04-28T06:13:46.936105Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2016-04-28T06:13:46.936121Z 0 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
2016-04-28T06:13:46.936169Z 0 [Note] Shutting down plugin 'MEMORY'
2016-04-28T06:13:46.936179Z 0 [Note] Shutting down plugin 'CSV'
2016-04-28T06:13:46.936184Z 0 [Note] Shutting down plugin 'MyISAM'
2016-04-28T06:13:46.936196Z 0 [Note] Shutting down plugin 'sha256_password'
2016-04-28T06:13:46.936200Z 0 [Note] Shutting down plugin 'mysql_native_password'
2016-04-28T06:13:46.936321Z 0 [Note] Shutting down plugin 'binlog'
2016-04-28T06:13:46.936427Z 0 [Note] /usr/sbin/mysqld: Shutdown complete

2016-04-28T06:13:46.947072Z mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

最佳答案

尝试更新/升级Mysql。 或者重置mysql.user表,它已损坏。 因为日志说:

Fatal error: mysql.user table is damaged. Please run mysql_upgrade.

关于mysql - 错误: while trying to restart mysql,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36906991/

相关文章:

Nginx如何阻止某些发布请求

CentOS RVM 错误 : Unknown ruby string (do not know how to handle): ruby-2. 1.0

docker - 我在安装 Docker 时遇到错误

mysql - 如果表为空或满足连接条件则插入

php - 在 MySQL 中更改文本的特定字符

MySQL 准备语句语法

linux - 在 Linux 中持久存在的环境变量的设置

php - 在第 317 行获取 fatal error : Using $this when not in object context in Stemmer. php

mysql - Yosemite 上的 MySQL 问题

mysql - 是否可以从 CentOS 命令行执行数据库插入?