Home > Database > Mysql Tutorial > Why can't the downloaded mysql be installed?

Why can't the downloaded mysql be installed?

藏色散人
Release: 2020-09-30 10:38:55
Original
6293 people have browsed it

Solution to the problem that mysql cannot be installed: First uninstall MySQL; then delete the directory "C:\Documents and Settings\All Users\Application Data\MySQL"; and finally reinstall MySQL.

Why can't the downloaded mysql be installed?

Recommended: "mysql tutorial"

Mysql database cannot be installed! Mysql cannot be installed in the last step! mysql just can’t be installed! Isn’t it a headache and nerve-wracking? Don’t worry now. The editor has sorted out the reasons for mysql installation failure and the solutions to mysql installation failure. Take a look now!

Difficulty 1: MySQL 5.1 reported an apply security setting error during the installation process

1. Uninstall MySQL.

2. Delete the directory C:\Documents and Settings\All Users\Application Data\MySQL.

3. Reinstall MySQL and it will be OK.

Difficulty 2: MySQL prompt Could not start the service MySQL prompt

Install mysql 5.1.33 and run An error occurred in the third item Start Service in the Execute configuration step of the Server Instance Configuration wizard. The error message was Could not start the service MySQL

Analysis: This kind of The situation is usually caused by mysql being installed and not being uninstalled cleanly. After uninstalling, restart and then reinstall. Pay attention to the service. If it cannot be uninstalled, you can use mysqld-nt -remove to uninstall it.

The specific method is as follows:

1. Check whether there is mysql in the service, and if so, stop the service.

2. Run Add and Remove Programs in the control panel to uninstall mysql.

3. After uninstalling, open the registry (In Start---Run, enter regedit),

Check the key value under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services, If there are related mysql key values ​​(mysql, mysqladmin), delete them.

4. Restart and delete the remaining installation directory of mysql (check the service, there is no mysql in the service at this time).

5. Reinstall mysql. Do not run the Server Instance Configuration wizard after installation. Run the wizard in the start menu after restarting.

Difficulty 3: msyql installation to the last step start service error

1. Go to the control panel and install mysql first delete.

2. Go to the C:\Program Files directory on the c drive and delete the mysql directory.

3. If there are settings directories on other disks, delete them as well. Empty directories must also be deleted.

4. Go to regedit and copy the registry:

HKEY_LOCAL_MACHINE/SYSTEM/ControlSet001/Services/Eventlog/Applications/MySQL

HKEY_LOCAL_MACHINE/ SYSTEM/ControlSet002/Services/Eventlog/Applications/MySQL

##HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/Eventlog/Applications/MySQL

If any, all delete! (

Tips: Use F3 loop to search for "mysql") 5. If the mysql content in the task manager is also deleted.

5. Turn off the firewall.

6. Reinstall mysql (I did not restart the computer here).

If necessary during reinstallation, restart the computer, disable IIS, and delete the temporary files in temp.

If that doesn't work, change the mysql service name to a different service name when configuring mysql.

The above are the errors often encountered when installing mysql. I hope this article will be helpful to everyone's learning.

Mysql installation precautions and analysis of five reasons for installation failure

Error 1: On the last page of wizard installation, the error "cannot create Windows service for mysql.error:0" appears

Solution: Open the command line and enter the sc delete mysql command, which is
C:>sc delete mysql
[SC] DeleteService SUCCESS
Restart the computer, or uninstall, restart and then install it. alright. I uninstalled and restarted.

One thing to note when uninstalling and reinstalling is that after uninstalling in the control panel, delete the Mysql folder in the c:\Documents and Settings\All Users\Application Data directory. It may contain the configuration information you uninstalled, which will affect the next installation.

Error 2: When asking the administrator to enter the password, there is a line of current password in addition to password and confirm password.

This means that you did not delete the Mysql folder in the directory mentioned in Article 1 before installation. I don’t know if it will affect subsequent use, but it may be okay if you remember the password. By the way, the administrator password is set by myself, and the user name is root by default.

After successful installation, you can test as follows: open mysql command line client, enter the password, and
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3# appears. ## Server version: 5.1.33-community MySQL Community Server (GPL)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
The installation is successful!

Error 3: mysql server configuration failed. Check the error message in the configuration wizard and see the following statement:
mysql-server-5.5-win32:60 - Adding firewall rule for MySQL55 on port 3306.
mysql-server-5.5-win32: 66 - Adding firewall rule failed.
indicates that the firewall installation failed.
Check the installation log and you can find the following statement:
mysql-installer Information: 10: Attempting to create firewall rule with command: netsh.exe firewall add portopening protocol=TCP port=3306 profile=ALL name=MySQL55 mode=ENABLE scope=ALL
mysql-installer Information: 10 : Unexpected response from netsh: OK.
mysql-installer Information: 10: Attempting to create firewall rule with command: netsh.exe advfirewall firewall add rule name=”Port 3306” protocol=TCP localport=3306 dir=in action=allow
mysql-installer Information : 10 : Unexpected response from netsh: The following command was not found: advfirewall firewall add rule name=”Port 3306” protocol=TCP localport=3306 dir=in action=allow.
This situation shows that the installation of mysql does not support the Chinese system well and cannot recognize the "OK" information returned by netsh.exe, and then runs the netsh.exe advfirewall command that can run on other windows platforms (this command does not It is supported, so an error that the command cannot be found is reported.
There are two solutions:
①Set the language of your operating system to English, and then reinstall mysql. For details, you can enter the control panel-> Change the region and language; in addition, check whether the current user has the permission to start the firewall, check the properties of the Application Layer Gateway Service in the computer service, and check whether the user in the login tab is the current user.
② Check the firewall port , if it has been added successfully, it will not be processed. If it is not added successfully, you will manually add the port in the firewall.

Error 4: After the installation is successful, you can only connect to the mysql of localhost through the mysql 5.5 command line client. server, but cannot remotely connect to mysql server through workbench or other client tools. Keywords: cannot remotely connect to mysql server.
Possible reasons:
① There is no open port, see the previous solution .
② The user is not authorized to connect remotely 3306.
③ Mysql server does not allow remote connections.
For ② the user is not authorized to connect remotely, you can authorize the user, such as the default root user, you can use the mysql 5.5 command line Enter the following command in the client:

//选择数据库
mysql>use mysql;
//给用户授权,yourpassword字段用你的密码代替
mysql>grant all priileges on *.* to identified by 'yourpassword';
//刷新系统权限表
mysql>flush privileges;
//查看是否授权成功
mysql> show grants for roots;
Copy after login

If the authorization just appeared, it means success. If not, try adding a new user yourself and add the user's command:


insert into mysql.user(Host,User,Password,ssl_cipher,x509_issuer,x509_subject) values("%","newuser",password("newpassword"),'','','')
Copy after login

对于③mysql server不允许远程连接的解决办法是,找到自己的my.ini,在[mysqld]下增加一行语句:
bind-address=0.0.0.0
表示不绑定IP,重启你的Mysql服务。
错误5:配置文件my.ini的位置
MySQL配置向导将my.ini文件放置在MySQL服务器的安装目录中。这将有助于将配置文件和具体的服务器实例相 关联。为了保证MySQL服务器知道到哪里查找my.ini文件,和下面内容类似的参数将会被作为服务安装的一部分 传递给MySQL服务器:--defaults-file="C:\Program Files\MySQL\MySQL Server 5.5\my.ini C:\Program Files\MySQL\MySQL Server 5.5可以被指向MySQL服务器的安装路径所代替。
编辑my.ini文:可以使用文本编辑器打开该文件同时做出必要的编辑和修改。你也可以以MySQL Administrator的应用程序来修 改服务器配置。 MySQL客户端和应用程序,例如mysql命令行客户端和mysqldump并不能确定位于服务器安装目录中的my.ini文件 的位置。为了配置客户端和应用程序,根据你的Windows版本的不同,在C:\Windows下或者在C:\WINNT目录下生 成新的文件my.ini 文件
如果你的MySQL配置向导发现了一个已经存在的my.ini文件,你可以重新配置已经存在的服务器,或者通过删除 my.ini文件、停止并移除MySQL服务的方法移除服务器实例。重新配置已经存在的服务器,选择“重新配置实例”选项并且选择“下一步”按钮。已经存在的my.ini文件被 重新命名为mytimestamp.ini.bak,时间戳是已经存在的my.ini创建时的日期和时间。移除已经存在的数据库实 例,选择“移除实例”选项并选择“下一步”按钮。如果选择了“移除实例”选项,进入到确认界面。单击“运行”按钮:MySQL配置向导停止并开始移除MySQL服 务,并删除my.ini文件。但服务器安装目录并没有移除。如果选择了“重新配置实例”选项,进入到“配置类型”界面,可以选择安装想要配置的安装类型。

The above is the detailed content of Why can't the downloaded mysql be installed?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template