mysql: 服务没有报告任何错误

今天新安装了mysql5.7,配置完环境变量后,想启动它时却出现了以下异常:

2016-06-18T04:29:24.455063Z 0 [ERROR] Fatal error: Can't open and lock privilege
 tables: Table 'mysql.user' doesn't exist
2016-06-18T04:29:24.456064Z 0 [ERROR] Aborting

2016-06-18T04:29:24.456064Z 0 [Note] Binlog end
2016-06-18T04:29:24.457064Z 0 [Note] Shutting down plugin 'ngram'
2016-06-18T04:29:24.457064Z 0 [Note] Shutting down plugin 'partition'
2016-06-18T04:29:24.458065Z 0 [Note] Shutting down plugin 'BLACKHOLE'
2016-06-18T04:29:24.458065Z 0 [Note] Shutting down plugin 'ARCHIVE'
2016-06-18T04:29:24.458065Z 0 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
2016-06-18T04:29:24.459066Z 0 [Note] Shutting down plugin 'MRG_MYISAM'
2016-06-18T04:29:24.460066Z 0 [Note] Shutting down plugin 'MyISAM'
2016-06-18T04:29:24.460066Z 0 [Note] Shutting down plugin 'INNODB_SYS_VIRTUAL'
2016-06-18T04:29:24.461068Z 0 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'

2016-06-18T04:29:24.461068Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACE
S'
2016-06-18T04:29:24.461068Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_CO
LS'
2016-06-18T04:29:24.462068Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
2016-06-18T04:29:24.462068Z 0 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
2016-06-18T04:29:24.463068Z 0 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
2016-06-18T04:29:24.463068Z 0 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
2016-06-18T04:29:24.464069Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS
'
2016-06-18T04:29:24.464069Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
2016-06-18T04:29:24.465070Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE
'
2016-06-18T04:29:24.466071Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE
'
2016-06-18T04:29:24.466071Z 0 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
2016-06-18T04:29:24.467073Z 0 [Note] Shutting down plugin 'INNODB_FT_BEING_DELET
ED'
2016-06-18T04:29:24.468074Z 0 [Note] Shutting down plugin 'INNODB_FT_DELETED'
2016-06-18T04:29:24.468074Z 0 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STO
PWORD'
2016-06-18T04:29:24.469072Z 0 [Note] Shutting down plugin 'INNODB_METRICS'
2016-06-18T04:29:24.469072Z 0 [Note] Shutting down plugin 'INNODB_TEMP_TABLE_INF
O'
2016-06-18T04:29:24.470073Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_ST
ATS'
2016-06-18T04:29:24.471074Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LR
U'
2016-06-18T04:29:24.471074Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
2016-06-18T04:29:24.471074Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_
RESET'
2016-06-18T04:29:24.472074Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'

2016-06-18T04:29:24.473075Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
2016-06-18T04:29:24.473075Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM'
2016-06-18T04:29:24.473075Z 0 [Note] Shutting down plugin 'INNODB_CMP_RESET'
2016-06-18T04:29:24.474076Z 0 [Note] Shutting down plugin 'INNODB_CMP'
2016-06-18T04:29:24.475077Z 0 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
2016-06-18T04:29:24.475077Z 0 [Note] Shutting down plugin 'INNODB_LOCKS'
2016-06-18T04:29:24.476079Z 0 [Note] Shutting down plugin 'INNODB_TRX'
2016-06-18T04:29:24.476079Z 0 [Note] Shutting down plugin 'InnoDB'
2016-06-18T04:29:24.477077Z 0 [Note] InnoDB: FTS optimize thread exiting.
2016-06-18T04:29:24.477077Z 0 [Note] InnoDB: Starting shutdown...
2016-06-18T04:29:24.579147Z 0 [Note] InnoDB: Dumping buffer pool(s) to D:\for_wo
rk\mysql-5.7.13-winx64\data\ib_buffer_pool
2016-06-18T04:29:24.584149Z 0 [Note] InnoDB: Buffer pool(s) dump completed at 16
0618 12:29:24
2016-06-18T04:29:25.950082Z 0 [Note] InnoDB: Shutdown completed; log sequence nu
mber 1210046
2016-06-18T04:29:25.951083Z 0 [Note] InnoDB: Removed temporary tablespace data f
ile: "ibtmp1"
2016-06-18T04:29:25.951083Z 0 [Note] Shutting down plugin 'MEMORY'
2016-06-18T04:29:25.951083Z 0 [Note] Shutting down plugin 'CSV'
2016-06-18T04:29:25.952084Z 0 [Note] Shutting down plugin 'sha256_password'
2016-06-18T04:29:25.953084Z 0 [Note] Shutting down plugin 'mysql_native_password
'
2016-06-18T04:29:25.953084Z 0 [Note] Shutting down plugin 'binlog'
2016-06-18T04:29:25.954088Z 0 [Note] mysqld: Shutdown complete

网上查了下,解决方法如下:

  1. 删除mysql路径下的data文件夹
  2. 执行mysqld --initialize
  3. 重新启动mysql

你可能感兴趣的:(mysql: 服务没有报告任何错误)