开发工具与关键技术:mysql
撰写时间:2022/9/28
首先说明:笔者在安装第一次的时候就出现以下问题,拿虚拟机安装的时候,同样的步骤,安装成功。主机使用zip安装包安装的时候也可以安装,但会出现一个Can‘t connect to MySQL server on ‘localhost:3306‘ (10061)的bug,如果你也有这个bug推荐你先起看以下链接备份一下数据库解决:Can‘t connect to MySQL server on ‘localhost:3306‘ (10061)_八角.。的博客-CSDN博客_mysql无法连接localhost3306
再看教程重装mysql,因为下周这个bug还会出现,笔者就是重装了5~6次zip安装包受不了才搞这个bug的,经笔者分析这个bug是mysql服务没开起来,怎么都开不起来的那种(╯﹏╰)b
分析bug:
1、安装mysql8.016时到最后一步时,如下图,出现了小红点无法往下执行了,这是安装时出现的问题
2、问题分析及解决办法
- 查看log,log的内容如下,我把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.29…
Starting process with command: F:\mySQL\MySQL Server 8.0\bin\mysqld.exe –defaults-file=”C:\ProgramData\MySQL\MySQL 8.0\my.ini” –console –initialize-insecure=on –lower-case-table-names=1…
mysqld: File ‘.\闈掕~娉” />
点击箭头会发现bug翻译为电脑名称…
删除mysql环境:
解决bug:
设置计算机名称为英文或拼音重装mysql,就好了
总结:计算机名别改中文名称,再重装mysql就好了(ಥ_ಥ)
这是我所学到的mysql,所以我要分享给你们,希望可以帮助到你们。
以上就是我的分享,新手上道,请多多指教。如果有更好的方法或不懂得地方欢迎在评论区教导
和提问喔!