Windows 安装 MySQL 8.0 问题

朱雀 2022-09-27 06:28 960阅读 0赞

安装 MySQL 8.0 遇到问题

  • 1-安装 MySQL 8.0 发生错误
  • 2-查看安装日志 Log
  • 3-解决方法
    • 3.1-Win + R -> 输入 services.msc
    • 3.2-双击打开服务 -> 登录 -> 登录身份 -> 本地系统账户
    • 3.3-返回 MySQL 安装界面重试

1-安装 MySQL 8.0 发生错误

Attempting to connect to Mysql@localhost:3306 with user root with no password...
在这里插入图片描述


2-查看安装日志 Log

在这里插入图片描述

  1. Beginning configuration step: Writing configuration file
  2. Saving my.ini configuration file...
  3. Saved my.ini configuration file.
  4. Ended configuration step: Writing configuration file
  5. Beginning configuration step: Updating Windows Firewall rules
  6. Adding a Windows Firewall rule for MySQL80 on port 3306.
  7. Attempting to add a Windows Firewall rule with command: netsh.exe advfirewall firewall add rule name="Port 3306" protocol=TCP localport=3306 dir=in action=allow
  8. 尝试联系 Windows Defender 防火墙服务时发生错误。请确保该服务正在运行,然后重试你的请求。
  9. An error occurred running netsh.exe add:
  10. The netsh.exe process did not return any error. Review the application log to see if there is a trace of the error.
  11. The attempt to add a Windows Firewall rule failed.
  12. You can add or delete a Windows Firewall rule manually by following the instructions at this URL:
  13. http://windows.microsoft.com/en-US/windows-vista/Allow-a-program-to-communicate-through-Windows-Firewall
  14. Failed to add the Windows Firewall rule.
  15. Adding a Windows Firewall rule for MySQL80 on port 33060.
  16. Attempting to add a Windows Firewall rule with command: netsh.exe advfirewall firewall add rule name="Port 33060" protocol=TCP localport=33060 dir=in action=allow
  17. 尝试联系 Windows Defender 防火墙服务时发生错误。请确保该服务正在运行,然后重试你的请求。
  18. An error occurred running netsh.exe add:
  19. The netsh.exe process did not return any error. Review the application log to see if there is a trace of the error.
  20. The attempt to add a Windows Firewall rule failed.
  21. You can add or delete a Windows Firewall rule manually by following the instructions at this URL:
  22. http://windows.microsoft.com/en-US/windows-vista/Allow-a-program-to-communicate-through-Windows-Firewall
  23. Failed to add the Windows Firewall rule.
  24. Ended configuration step: Updating Windows Firewall rules
  25. Beginning configuration step: Adjusting Windows service
  26. Attempting to grant Network Service require filesystem permissions.
  27. Granted permissions.
  28. Adding new service
  29. New service added
  30. Ended configuration step: Adjusting Windows service
  31. Beginning configuration step: Initializing database (may take a long time)
  32. Deleting the data directory from a previous (failed) configuration...
  33. Attempting to run MySQL Server with --initialize-insecure option...
  34. Starting process for MySQL Server 8.0.15...
  35. Starting process with command: C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe --defaults-file="C:\ProgramData\MySQL\MySQL Server 8.0\my.ini" --console --initialize-insecure=on --lower-case-table-names=1...
  36. 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
  37. C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe (mysqld 8.0.15) initializing of server in progress as process 6128
  38. root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.
  39. C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe (mysqld 8.0.15) initializing of server has completed
  40. Process for mysqld, with ID 6128, was run successfully and exited with code 0.
  41. Successfully started process for MySQL Server 8.0.15.
  42. MySQL Server 8.0.15 intialized the database successfully.
  43. Ended configuration step: Initializing database (may take a long time)
  44. Beginning configuration step: Starting the server
  45. Attempting to start service MySQL80...
  46. Failed to start service MySQL80.
  47. Waiting until a connection to MySQL Server 8.0.15 can be established (with a maximum of 10 attempts)...
  48. Retry 1: Attempting to connect to Mysql@localhost:3306 with user root with no password...
  49. MySQL error 1042: Unable to connect to any of the specified MySQL hosts.
  50. Waiting 5 seconds before the next connection attempt...
  51. Retry 2: Attempting to connect to Mysql@localhost:3306 with user root with no password...
  52. MySQL error 1042: Unable to connect to any of the specified MySQL hosts.
  53. Waiting 5 seconds before the next connection attempt...
  54. Retry 3: Attempting to connect to Mysql@localhost:3306 with user root with no password...
  55. MySQL error 1042: Unable to connect to any of the specified MySQL hosts.
  56. Waiting 5 seconds before the next connection attempt...
  57. Retry 4: Attempting to connect to Mysql@localhost:3306 with user root with no password...
  58. MySQL error 1042: Unable to connect to any of the specified MySQL hosts.
  59. Waiting 5 seconds before the next connection attempt...
  60. Retry 5: Attempting to connect to Mysql@localhost:3306 with user root with no password...
  61. MySQL error 1042: Unable to connect to any of the specified MySQL hosts.
  62. Waiting 5 seconds before the next connection attempt...
  63. Retry 6: Attempting to connect to Mysql@localhost:3306 with user root with no password...
  64. MySQL error 1042: Unable to connect to any of the specified MySQL hosts.
  65. Waiting 5 seconds before the next connection attempt...
  66. Retry 7: Attempting to connect to Mysql@localhost:3306 with user root with no password...
  67. MySQL error 1042: Unable to connect to any of the specified MySQL hosts.
  68. Waiting 5 seconds before the next connection attempt...
  69. Retry 8: Attempting to connect to Mysql@localhost:3306 with user root with no password...
  70. MySQL error 1042: Unable to connect to any of the specified MySQL hosts.
  71. Waiting 5 seconds before the next connection attempt...
  72. Retry 9: Attempting to connect to Mysql@localhost:3306 with user root with no password...
  73. MySQL error 1042: Unable to connect to any of the specified MySQL hosts.
  74. Waiting 5 seconds before the next connection attempt...
  75. Retry 10: Attempting to connect to Mysql@localhost:3306 with user root with no password...
  76. MySQL error 1042: Unable to connect to any of the specified MySQL hosts.
  77. Failed to connect to MySQL Server 8.0.15 after 10 attempts.
  78. Ended configuration step: Starting the server

3-解决方法

3.1-Win + R -> 输入 services.msc

打开本地服务,找到MySQL服务:
在这里插入图片描述

3.2-双击打开服务 -> 登录 -> 登录身份 -> 本地系统账户

在这里插入图片描述

3.3-返回 MySQL 安装界面重试

在这里插入图片描述


发表评论

表情:
评论列表 (有 0 条评论,960人围观)

还没有评论,来说两句吧...

相关阅读