MySQL 5.7.* 启动问题


mysql-5.7.10-winx64

启动 mysqld.exe,报错:

mysqld: Could not create or access the registry key needed for the MySQL application
to log to the Windows EventLog. Run the application with sufficient
privileges once to create the key, add the key manually, or turn off
logging for that application.

加参数 mysqld.exe --console,查看启动 log 

[ERROR] Cannot open Windows EventLog; check privileges, or start server with --log_syslog=0

第一个 [ERROR],关于Windows EventLog,忽略

[ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.

第二处 [ERROR],mysql.plugin

[ERROR] Fatal error: Can't open and lock privilege table s: Table 'mysql.user' doesn't exist 

第三处 [ERROR],Table 'mysql.user' doesn't exist。可以判断初始化出了问题

 运行:

mysqld  --initialize-insecure
注:在初始化时如果加上 –initial-insecure,则会创建空密码的 root@localhost 账号,否则会创建带密码的 root@localhost 账号,密码直接写在日志文件中(datadir/hostname.err)

问题解决~

 参考:

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM