mysql-5.7.10-winx64 MySQL服务无法启动,服务没有报告任何错误的解决办法

总结报错原因:
在my.init文件下新增data目录(datadir = F:\mysqldata )

最新解压版本的mysql 解压安装的时候报错
D:\mysql\mysql-5.7.10-winx64\bin>net start mysql
MySQL 服务正在启动 ....
MySQL 服务无法启动。

服务没有报告任何错误。

请键入 NET HELPMSG 3534 以获得更多的帮助。

 
 
mysql下面是没有data文件夹的,此文件夹不需要自己建
 
D:\mysql\mysql-5.7.10-winx64\bin> mysqld --console
2015-12-21T07:25:01.465815Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2015-12-21T07:25:01.465815Z 0 [Warning] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They willbe merged with strict mode in a future release.
2015-12-21T07:25:01.465815Z 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not set.
2015-12-21T07:25:01.465815Z 0 [Warning] Insecure configuration for --secure-file-priv: Current value does not restrict location of generated files. Consider setting it to a valid, non-empty path.
2015-12-21T07:25:01.467815Z 0 [Note] mysqld (mysqld 5.7.10-log) starting as process 3708 ...
2015-12-21T07:25:01.491816Z 0 [Warning] No argument was provided to --log-bin, and --log-bin-index was not used; so replication may break when this MySQL server acts as a master and has his hostname changed!! Please use '--log-bin=PC201305252052-bin' to avoid this problem.
2015-12-21T07:25:01.527818Z 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2015-12-21T07:25:01.528818Z 0 [Note] InnoDB: Uses event mutexes
2015-12-21T07:25:01.531819Z 0 [Note] InnoDB: _mm_lfence() and _mm_sfence() are used for memory barrier
2015-12-21T07:25:01.535819Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
2015-12-21T07:25:01.540819Z 0 [Note] InnoDB: Number of pools: 1
2015-12-21T07:25:01.544819Z 0 [Note] InnoDB: Not using CPU crc32 instructions
2015-12-21T07:25:01.654826Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2015-12-21T07:25:01.705829Z 0 [Note] InnoDB: Completed initialization of buffer pool
2015-12-21T07:25:01.834836Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2015-12-21T07:25:01.991845Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2015-12-21T07:25:01.994845Z 0 [Note] InnoDB: Setting file '.\ibtmp1' size to 12MB. Physically writing the file full; Please wait ...
2015-12-21T07:25:02.264861Z 0 [Note] InnoDB: File '.\ibtmp1' size is now 12 MB.
2015-12-21T07:25:02.275861Z 0 [Note] InnoDB: 96 redo rollback segment(s) found.
96 redo rollback segment(s) are active.
2015-12-21T07:25:02.276861Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2015-12-21T07:25:02.284862Z 0 [Note] InnoDB: Waiting for purge to start
2015-12-21T07:25:02.335865Z 0 [Note] InnoDB: 5.7.10 started; log sequence number 1209980
2015-12-21T07:25:02.338865Z 0 [Note] Plugin 'FEDERATED' is disabled.
2015-12-21T07:25:02.339865Z 0 [Note] InnoDB: Loading buffer pool(s) from F:\mysqldata\ib_buffer_pool
2015-12-21T07:25:02.339865Z 0 [Note] InnoDB: not started mysqld: Table 'mysql.plugin' doesn't exist
2015-12-21T07:25:02.348865Z 0 [Note] InnoDB: Buffer pool(s) load completed at 151221 15:25:02
2015-12-21T07:25:02.351865Z 0 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
2015-12-21T07:25:02.396868Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2015-12-21T07:25:02.401868Z 0 [Warning] Failed to set up SSL because of the following SSL library error: SSL context is not usable without certificate and private key
2015-12-21T07:25:02.402868Z 0 [Note] Server hostname (bind-address): '*'; port:3306
2015-12-21T07:25:02.415869Z 0 [Note] IPv6 is available.
2015-12-21T07:25:02.416869Z 0 [Note]   - '::' resolves to '::';
2015-12-21T07:25:02.419869Z 0 [Note] Server socket created on IP: '::'.
2015-12-21T07:25:02.430870Z 0 [Warning] Failed to open optimizer cost constant tables


2015-12-21T07:25:02.436870Z 0 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist
2015-12-21T07:25:02.440871Z 0 [ERROR] Aborting


2015-12-21T07:25:02.441871Z 0 [Note] Binlog end
2015-12-21T07:25:02.457872Z 0 [Note] Shutting down plugin 'ngram'
2015-12-21T07:25:02.457872Z 0 [Note] Shutting down plugin 'partition'
2015-12-21T07:25:02.460872Z 0 [Note] Shutting down plugin 'BLACKHOLE'
2015-12-21T07:25:02.463872Z 0 [Note] Shutting down plugin 'ARCHIVE'
2015-12-21T07:25:02.468872Z 0 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
2015-12-21T07:25:02.468872Z 0 [Note] Shutting down plugin 'MRG_MYISAM'
2015-12-21T07:25:02.475873Z 0 [Note] Shutting down plugin 'MyISAM'
2015-12-21T07:25:02.476873Z 0 [Note] Shutting down plugin 'INNODB_SYS_VIRTUAL'
2015-12-21T07:25:02.480873Z 0 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'


2015-12-21T07:25:02.482873Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
2015-12-21T07:25:02.493874Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
2015-12-21T07:25:02.495874Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
2015-12-21T07:25:02.498874Z 0 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
2015-12-21T07:25:02.503874Z 0 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
2015-12-21T07:25:02.509875Z 0 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
2015-12-21T07:25:02.513875Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
2015-12-21T07:25:02.518875Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
2015-12-21T07:25:02.521875Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
2015-12-21T07:25:02.524875Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
2015-12-21T07:25:02.528876Z 0 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
2015-12-21T07:25:02.531876Z 0 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
2015-12-21T07:25:02.537876Z 0 [Note] Shutting down plugin 'INNODB_FT_DELETED'
2015-12-21T07:25:02.539876Z 0 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
2015-12-21T07:25:02.542876Z 0 [Note] Shutting down plugin 'INNODB_METRICS'
2015-12-21T07:25:02.545877Z 0 [Note] Shutting down plugin 'INNODB_TEMP_TABLE_INFO'
2015-12-21T07:25:02.553877Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
2015-12-21T07:25:02.555877Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
2015-12-21T07:25:02.558877Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
2015-12-21T07:25:02.561878Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
2015-12-21T07:25:02.563878Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'


2015-12-21T07:25:02.566878Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
2015-12-21T07:25:02.572878Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM'
2015-12-21T07:25:02.574878Z 0 [Note] Shutting down plugin 'INNODB_CMP_RESET'
2015-12-21T07:25:02.577878Z 0 [Note] Shutting down plugin 'INNODB_CMP'
2015-12-21T07:25:02.580879Z 0 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
2015-12-21T07:25:02.582879Z 0 [Note] Shutting down plugin 'INNODB_LOCKS'
2015-12-21T07:25:02.584879Z 0 [Note] Shutting down plugin 'INNODB_TRX'
2015-12-21T07:25:02.586879Z 0 [Note] Shutting down plugin 'InnoDB'
2015-12-21T07:25:02.587879Z 0 [Note] InnoDB: FTS optimize thread exiting.
2015-12-21T07:25:02.589879Z 0 [Note] InnoDB: Starting shutdown...
2015-12-21T07:25:02.690885Z 0 [Note] InnoDB: Dumping buffer pool(s) to F:\mysqldata\ib_buffer_pool
2015-12-21T07:25:02.698885Z 0 [Note] InnoDB: Buffer pool(s) dump completed at 151221 15:25:02
2015-12-21T07:25:03.850951Z 0 [Note] InnoDB: Shutdown completed; log sequence number 1209999
2015-12-21T07:25:03.853951Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2015-12-21T07:25:03.863952Z 0 [Note] Shutting down plugin 'MEMORY'
2015-12-21T07:25:03.866952Z 0 [Note] Shutting down plugin 'CSV'
2015-12-21T07:25:03.876953Z 0 [Note] Shutting down plugin 'sha256_password'
2015-12-21T07:25:03.879953Z 0 [Note] Shutting down plugin 'mysql_native_password'
2015-12-21T07:25:03.882953Z 0 [Note] Shutting down plugin 'binlog'
2015-12-21T07:25:03.892954Z 0 [Note] mysqld: Shutdown complete

 
 
D:\mysql\mysql-5.7.10-winx64\bin> mysqld --initialize
2015-12-21T07:28:50.310904Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2015-12-21T07:28:50.311904Z 0 [Warning] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They willbe merged with strict mode in a future release.
2015-12-21T07:28:50.311904Z 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not set.
2015-12-21T07:28:50.318904Z 0  [ERROR] --initialize specified but the data directory has files in it. Aborting .
2015-12-21T07:28:50.324905Z 0  [ERROR] Aborting

 
 
上面的错误是自己建了data文件夹之后 用 mysqld  --initialize报错。
 
删除之前建的data文件夹,然后注释my.init文件下的datadir,由mysql自己创建即可。
D:\mysql-5.7.10-winx64\bin>mysqld  --initialize
D:\mysql-5.7.10-winx64\bin>net start mysql
MySQL 服务正在启动 .
MySQL 服务已经启动成功。

你可能感兴趣的:(mysql-5.7.10-winx64 MySQL服务无法启动,服务没有报告任何错误的解决办法)