win7环境下部署Mysql8报错处理

本文涉及的产品
云数据库 RDS MySQL,集群系列 2核4GB
推荐场景:
搭建个人博客
RDS MySQL Serverless 基础系列,0.5-2RCU 50GB
RDS MySQL Serverless 高可用系列,价值2615元额度,1个月
简介: win7环境下部署Mysql8报错处理

前言


在win7环境下部署Mysql8的时候,出现了以下报错,总结如下


1.Winwods安装初始化报错

8161ec4805114c25a6a7eb489e60a558.png


1.1 报错log如下


Beginning configuration step: Writing configuration file
Saving my.ini configuration file...
Saved my.ini configuration file.
Ended configuration step: Writing configuration file
Beginning configuration step: Updating Windows Firewall rules
Adding a Windows Firewall rule for MySQL80 on port 3306.
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
确定。
Successfully added the Windows Firewall rule.
Adding a Windows Firewall rule for MySQL80 on port 33060.
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
确定。
Successfully added the Windows Firewall rule.
Ended configuration step: Updating Windows Firewall rules
Beginning configuration step: Adjusting Windows service
Attempting to grant Network Service require filesystem permissions.
Granted permissions.
Adding new service
New service added
Ended configuration step: Adjusting Windows service
Beginning configuration step: Initializing database (may take a long time)
Attempting to run MySQL Server with --initialize-insecure option...
Starting process for MySQL Server 8.0.24...
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...
Process for mysqld, with ID 2572, was run successfully and exited with code -1073741515.
Failed to start process for MySQL Server 8.0.24.
Database initialization failed.
Ended configuration step: Initializing database (may take a long time)



1.2 解决办法:


安装VC_redist.x86即可执行既OK,官网下载补丁包即可

930c66aeea464bf2860669909e4c1973.png


2.Winwods安装启动Server报错


2.1 报错log


Beginning configuration step: Writing configuration file
Saving my.ini configuration file...
Saved my.ini configuration file.
Ended configuration step: Writing configuration file
Beginning configuration step: Updating Windows Firewall rules
Adding a Windows Firewall rule for MySQL80 on port 3306.
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
确定。
Successfully added the Windows Firewall rule.
Adding a Windows Firewall rule for MySQL80 on port 33060.
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
确定。
Successfully added the Windows Firewall rule.
Ended configuration step: Updating Windows Firewall rules
Beginning configuration step: Adjusting Windows service
Attempting to grant Network Service require filesystem permissions.
Granted permissions.
Adding new service
New service added
Ended configuration step: Adjusting Windows service
Beginning configuration step: Initializing database (may take a long time)
Attempting to run MySQL Server with --initialize-insecure option...
Starting process for MySQL Server 8.0.24...
Starting process with command: E:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe --defaults-file="E:\ProgramData\MySQL\MySQL Server 8.0\my.ini" --console --initialize-insecure=on --lower-case-table-names=1...
'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.
E:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe (mysqld 8.0.24) initializing of server in progress as process 3188
InnoDB initialization has started.
InnoDB initialization has ended.
root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.
Process for mysqld, with ID 3188, was run successfully and exited with code 0.
Successfully started process for MySQL Server 8.0.24.
MySQL Server 8.0.24 intialized the database successfully.
Ended configuration step: Initializing database (may take a long time)
Beginning configuration step: Starting the server
Attempting to start service MySQL80...
Successfully started service MySQL80.
Waiting until a connection to MySQL Server 8.0.24 can be established (with a maximum of 10 attempts)...
Retry 1: Attempting to connect to Mysql@localhost:3306 with user root with no password...
MySQL error 0: Authentication to host 'localhost' for user 'root' using method 'mysql_native_password' failed with message: Reading from the stream has failed.
Waiting 5 seconds before the next connection attempt...
Retry 2: Attempting to connect to Mysql@localhost:3306 with user root with no password...
MySQL error 0: Authentication to host 'localhost' for user 'root' using method 'mysql_native_password' failed with message: Reading from the stream has failed.
Waiting 5 seconds before the next connection attempt...
Retry 3: Attempting to connect to Mysql@localhost:3306 with user root with no password...
MySQL error 0: Authentication to host 'localhost' for user 'root' using method 'mysql_native_password' failed with message: Reading from the stream has failed.
Waiting 5 seconds before the next connection attempt...
Retry 4: Attempting to connect to Mysql@localhost:3306 with user root with no password...
MySQL error 0: Authentication to host 'localhost' for user 'root' using method 'mysql_native_password' failed with message: Reading from the stream has failed.
Waiting 5 seconds before the next connection attempt...
Retry 5: Attempting to connect to Mysql@localhost:3306 with user root with no password...
MySQL error 0: Authentication to host 'localhost' for user 'root' using method 'mysql_native_password' failed with message: Reading from the stream has failed.
Waiting 5 seconds before the next connection attempt...
Retry 6: Attempting to connect to Mysql@localhost:3306 with user root with no password...
MySQL error 0: Authentication to host 'localhost' for user 'root' using method 'mysql_native_password' failed with message: Reading from the stream has failed.
Waiting 5 seconds before the next connection attempt...
Retry 7: Attempting to connect to Mysql@localhost:3306 with user root with no password...
MySQL error 0: Authentication to host 'localhost' for user 'root' using method 'mysql_native_password' failed with message: Reading from the stream has failed.
Waiting 5 seconds before the next connection attempt...
Retry 8: Attempting to connect to Mysql@localhost:3306 with user root with no password...
MySQL error 0: Authentication to host 'localhost' for user 'root' using method 'mysql_native_password' failed with message: Reading from the stream has failed.
Waiting 5 seconds before the next connection attempt...
Retry 9: Attempting to connect to Mysql@localhost:3306 with user root with no password...
MySQL error 0: Authentication to host 'localhost' for user 'root' using method 'mysql_native_password' failed with message: Reading from the stream has failed.
Waiting 5 seconds before the next connection attempt...
Retry 10: Attempting to connect to Mysql@localhost:3306 with user root with no password...
MySQL error 0: Authentication to host 'localhost' for user 'root' using method 'mysql_native_password' failed with message: Reading from the stream has failed.
Failed to connect to MySQL Server 8.0.24 after 10 attempts.
Ended configuration step: Starting the server


2.2 解决方法


输入gpedit.msc,打开策略管理


2d14ad702dfd4704bde39a2f1e800d53.png

启用证书更新后正常



相关实践学习
如何快速连接云数据库RDS MySQL
本场景介绍如何通过阿里云数据管理服务DMS快速连接云数据库RDS MySQL,然后进行数据表的CRUD操作。
全面了解阿里云能为你做什么
阿里云在全球各地部署高效节能的绿色数据中心,利用清洁计算为万物互联的新世界提供源源不断的能源动力,目前开服的区域包括中国(华北、华东、华南、香港)、新加坡、美国(美东、美西)、欧洲、中东、澳大利亚、日本。目前阿里云的产品涵盖弹性计算、数据库、存储与CDN、分析与搜索、云通信、网络、管理与监控、应用服务、互联网中间件、移动服务、视频服务等。通过本课程,来了解阿里云能够为你的业务带来哪些帮助     相关的阿里云产品:云服务器ECS 云服务器 ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。产品详情: https://www.aliyun.com/product/ecs
目录
相关文章
|
17天前
|
NoSQL Java 关系型数据库
Liunx部署java项目Tomcat、Redis、Mysql教程
本文详细介绍了如何在 Linux 服务器上安装和配置 Tomcat、MySQL 和 Redis,并部署 Java 项目。通过这些步骤,您可以搭建一个高效稳定的 Java 应用运行环境。希望本文能为您在实际操作中提供有价值的参考。
92 26
|
10天前
|
关系型数据库 MySQL Linux
升级到MySQL 8.4,MySQL启动报错:io_setup() failed with EAGAIN
当MySQL 8.4启动时报错“io_setup() failed with EAGAIN”时,通常是由于系统AIO资源不足所致。通过增加AIO上下文数量、调整MySQL配置、优化系统资源或升级内核版本,可以有效解决这一问题。上述解决方案详细且实用,能够帮助管理员快速定位并处理此类问题,确保数据库系统的正常运行。
50 9
|
26天前
|
Java 关系型数据库 MySQL
如何将Spring Boot + MySQL应用程序部署到Pivotal Cloud Foundry (PCF)
如何将Spring Boot + MySQL应用程序部署到Pivotal Cloud Foundry (PCF)
45 5
|
1月前
|
关系型数据库 MySQL Linux
Linux环境下MySQL数据库自动定时备份实践
数据库备份是确保数据安全的重要措施。在Linux环境下,实现MySQL数据库的自动定时备份可以通过多种方式完成。本文将介绍如何使用`cron`定时任务和`mysqldump`工具来实现MySQL数据库的每日自动备份。
111 3
|
1月前
|
监控 关系型数据库 MySQL
Linux环境下MySQL数据库自动定时备份策略
在Linux环境下,MySQL数据库的自动定时备份是确保数据安全和可靠性的重要措施。通过设置定时任务,我们可以每天自动执行数据库备份,从而减少人为错误和提高数据恢复的效率。本文将详细介绍如何在Linux下实现MySQL数据库的自动定时备份。
51 3
|
1月前
|
关系型数据库 MySQL Docker
docker环境下mysql镜像启动后权限更改问题的解决
在Docker环境下运行MySQL容器时,权限问题是一个常见的困扰。通过正确设置目录和文件的权限,可以确保MySQL容器顺利启动并正常运行。本文提供了多种解决方案,包括在主机上设置正确的权限、使用Dockerfile和Docker Compose进行配置、在容器启动后手动更改权限以及使用 `init`脚本自动更改权限。根据实际情况选择合适的方法,可以有效解决MySQL容器启动后的权限问题。希望本文对您在Docker环境下运行MySQL容器有所帮助。
204 1
|
1月前
|
存储 SQL NoSQL
|
1月前
|
NoSQL 关系型数据库 MySQL
2024Mysql And Redis基础与进阶操作系列(8)作者——LJS[含MySQL 创建、修改、跟新、重命名、删除视图等具体详步骤;注意点及常见报错问题所对应的解决方法]
MySQL 创建、修改、跟新、重命名、删除视图等具体详步骤;举例说明注意点及常见报错问题所对应的解决方法
|
1月前
|
SQL NoSQL 关系型数据库
|
4天前
|
存储 Oracle 关系型数据库
数据库传奇:MySQL创世之父的两千金My、Maria
《数据库传奇:MySQL创世之父的两千金My、Maria》介绍了MySQL的发展历程及其分支MariaDB。MySQL由Michael Widenius等人于1994年创建,现归Oracle所有,广泛应用于阿里巴巴、腾讯等企业。2009年,Widenius因担心Oracle收购影响MySQL的开源性,创建了MariaDB,提供额外功能和改进。维基百科、Google等已逐步替换为MariaDB,以确保更好的性能和社区支持。掌握MariaDB作为备用方案,对未来发展至关重要。
18 3