win7环境下部署Mysql8报错处理

本文涉及的产品
RDS MySQL Serverless 基础系列,0.5-2RCU 50GB
云数据库 RDS PostgreSQL,高可用系列 2核4GB
云数据库 RDS MySQL,高可用系列 2核4GB
简介: 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

启用证书更新后正常



相关实践学习
每个IT人都想学的“Web应用上云经典架构”实战
本实验从Web应用上云这个最基本的、最普遍的需求出发,帮助IT从业者们通过“阿里云Web应用上云解决方案”,了解一个企业级Web应用上云的常见架构,了解如何构建一个高可用、可扩展的企业级应用架构。
MySQL数据库入门学习
本课程通过最流行的开源数据库MySQL带你了解数据库的世界。   相关的阿里云产品:云数据库RDS MySQL 版 阿里云关系型数据库RDS(Relational Database Service)是一种稳定可靠、可弹性伸缩的在线数据库服务,提供容灾、备份、恢复、迁移等方面的全套解决方案,彻底解决数据库运维的烦恼。 了解产品详情: https://www.aliyun.com/product/rds/mysql 
目录
相关文章
kde
|
18天前
|
存储 关系型数据库 MySQL
MySQL Docker 容器化部署全指南
MySQL是一款开源关系型数据库,广泛用于Web及企业应用。Docker容器化部署可解决环境不一致、依赖冲突问题,实现高效、隔离、轻量的MySQL服务运行,支持数据持久化与快速迁移,适用于开发、测试及生产环境。
kde
201 4
|
2月前
|
关系型数据库 MySQL 数据库
为什么 MySQL 不推荐用 Docker 部署?
本文探讨了MySQL是否适合容器化的问题,分析了Docker容器在数据安全、性能瓶颈、状态管理及资源隔离等方面的挑战,并指出目前主流分布式数据库如TDSQL和OceanBase仍倾向于部署在物理机或KVM上。
170 0
|
4月前
|
关系型数据库 MySQL 数据库
MySQL报错:未知系统变量'tx_isolation'及隔离级别查询
记住,选择合适的隔离级别,就像是在风平浪静的湖面上找到适合的划船速度——既要快到能赶上午饭(性能),又不至于翻船(数据一致性问题)。
238 3
|
5月前
|
Java 关系型数据库 MySQL
在Linux平台上进行JDK、Tomcat、MySQL的安装并部署后端项目
现在,你可以通过访问http://Your_IP:Tomcat_Port/Your_Project访问你的项目了。如果一切顺利,你将看到那绚烂的胜利之光照耀在你的项目之上!
338 41
|
5月前
|
开发框架 Java 关系型数据库
在Linux系统中安装JDK、Tomcat、MySQL以及部署J2EE后端接口
校验时,浏览器输入:http://[your_server_IP]:8080/myapp。如果你看到你的应用的欢迎页面,恭喜你,一切都已就绪。
453 17
|
5月前
|
Java 关系型数据库 MySQL
在Linux操作系统上设置JDK、Tomcat、MySQL以及J2EE后端接口的部署步骤
让我们总结一下,给你的Linux操作系统装备上最强的军队,需要先后装备好JDK的弓箭,布置好Tomcat的阵地,再把MySQL的物资原料准备好,最后部署好J2EE攻城车,那就准备好进军吧,你的Linux军团,无人可挡!
139 18
|
5月前
|
关系型数据库 MySQL Java
安装和配置JDK、Tomcat、MySQL环境,以及如何在Linux下更改后端端口。
遵循这些步骤,你可以顺利完成JDK、Tomcat、MySQL环境的安装和配置,并在Linux下更改后端端口。祝你顺利!
392 11
|
5月前
|
开发框架 关系型数据库 Java
Linux操作系统中JDK、Tomcat、MySQL的完整安装流程以及J2EE后端接口的部署
然后Tomcat会自动将其解压成一个名为ROOT的文件夹。重启Tomcat,让新“植物”适应新环境。访问http://localhost:8080/yourproject看到你的项目页面,说明“植物”种植成功。
153 10
|
1月前
|
缓存 关系型数据库 BI
使用MYSQL Report分析数据库性能(下)
使用MYSQL Report分析数据库性能
79 3
|
1月前
|
关系型数据库 MySQL 数据库
自建数据库如何迁移至RDS MySQL实例
数据库迁移是一项复杂且耗时的工程,需考虑数据安全、完整性及业务中断影响。使用阿里云数据传输服务DTS,可快速、平滑完成迁移任务,将应用停机时间降至分钟级。您还可通过全量备份自建数据库并恢复至RDS MySQL实例,实现间接迁移上云。

推荐镜像

更多