Considerations for installing Mysql and analysis of the five causes of installation failure _ MySQL
Developer on Alibaba Coud: Build your first app with APIs, SDKs, and tutorials on the Alibaba Cloud. Read more ＞
This article mainly introduces the considerations for installing Mysql and the analysis of the five causes of installation failure. For more information, see
Error 1: cannot create Windows service for mysql. error: 0
Solution: Open the command line and enter the SC delete mysql command
C:> SC delete mysql
[SC] DeleteService SUCCESS
Restart the computer, or restart the computer and then install it. I restarted it after uninstalling it.
To uninstall and reinstall Mysql, you must delete the Mysql folder in the c: \ Documents Ents and Settings \ All Users \ Application Data directory after uninstalling Mysql on the control panel. The configuration information you uninstalled may be recorded, which may be affected during the next installation.
Error 2: When the administrator enters the password, there is a row of current password besides password and confirm password.
This indicates that you have not deleted the Mysql folder under the Directory described in Article 1st before installation. I don't know whether it will affect subsequent use. it doesn't matter if I remember the password. In addition, the administrator password is set by himself, and the user name is the default root.
After the installation is successful, you can test the following: 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
Server version: 5.1.33-community MySQL Community Server (GPL)
Type 'help; 'or' \ H' for help. Type '\ C' to clear the buffer.
The installation is successful!
Error 3: mysql server configuration failed.
In the Configuration Wizard, the following statements are displayed:
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 fails to be installed.
View the installation log and 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 is not found: advfirewall firewall add rule name = "Port 3306" protocol = TCP localport = 3306 dir = in action = allow.
This situation indicates that mysql installation does not support the Chinese system well and does not recognize the exact response information of netsh.exereturned, and runs the netsh.exe advfirewall command that can be run on another Windows platform. (This command is not supported by xp, so an error cannot be found.
There are two solutions:
① Set the language of your operating system to English, and then reinstall mysql. You can go to Control Panel> area and language to change the settings. In addition, check whether the current user has the permission to start the firewall and view the properties of the Application Layer Gateway Service in computer services, check whether the user on the logon tab is the current user.
② Check the firewall Port. if it has been successfully added, it will not be processed. if it is not successfully added, manually add the port to the firewall.
Error 4: After the installation is successful, you can only connect to the mysql server of localhost through mysql 5.5 command line client, instead of remotely connecting to the mysql server through workbench or other client tools.
Keyword: cannot remotely connect to mysql server.
① No port is opened. See the previous article.
② The user is not authorized to remotely connect 3306.
③ Mysql server does not allow remote connection.
If the user does not authorize remote connection, you can authorize the user. for example, the default root user can enter the following command in mysql 5.5 command line client:
// Select a database
Mysql> use mysql;
// Authorize the user. replace the yourpassword field with your password.
Mysql> grant all priileges on *. * to identified by 'yourpassword ';
// Refresh the system permission list
Mysql> flush privileges;
// Check whether the authorization is successful
Mysql> show grants for roots;
If the preceding authorization is displayed, the authorization is successful. If it fails, add another new user. add the user's command:
Insert into mysql. user (Host, User, Password, ssl_cipher, x509_issuer, x509_subject) values ("%", "newuser", password ("newpassword "),'','','')
③ If mysql server does not allow remote connection, find your own my. ini and add a statement under [mysqld:
Bind-address = 0.0.0.0
It means you do not bind an IP address and restart your Mysql service.
Error 5: location of the configuration file my. ini
The MySQL configuration wizard places the my. ini file in the installation directory of the MySQL server. This will help associate the configuration file with a specific server instance. To ensure that the MySQL server knows where to find my. ini file. parameters similar to the following content will be passed to the MySQL server as part of the service installation: -- defaults-file = "C: \ Program Files \ MySQL Server 5.5 \ my. ini C: \ Program Files \ MySQL Server 5.5 can be replaced by the installation path pointing to the MySQL Server.
Edit my. ini file: you can use a text editor to open the file and make necessary edits and modifications. You can also modify the server configuration using the MySQL Administrator application. The MySQL client and application, such as the mysql command line client and mysqldump, cannot determine the location of the my. ini file in the server installation directory. To configure the client and application, generate a new file my. ini in C: \ Windows or in the C: \ WINNT directory based on your Windows version.
If your MySQL configuration wizard finds an existing my. ini file. you can reconfigure an existing server or delete my. ini file, stop and remove the MySQL service to remove the server instance. To reconfigure an existing server, select the "reconfigure instance" option and select the "next" button. The existing my. ini file is renamed as mytimestamp. ini. bak. the timestamp is the date and time when the existing my. ini file was created. Remove an existing database instance, select the "remove instance" option, and select the "next" button. If the "remove instance" option is selected, the confirmation page is displayed. Click "run". the MySQL configuration wizard stops and begins to remove MySQL services and deletes the my. ini file. However, the server installation directory is not removed. If you select the "reconfigure instance" option to go to the "configuration type" interface, you can select the installation type you want to configure.
This article is an English version of an article which is originally in the Chinese language on aliyun.com and is provided for information purposes only. This website makes no representation or warranty of any kind, either expressed or implied, as to the accuracy, completeness ownership or
reliability of the article or any translations thereof. If you have any concerns or complaints relating to the article, please send an email, providing a detailed description of the concern or
complaint, to firstname.lastname@example.org. A staff member will contact you within 5 working days. Once verified, infringing content will be removed immediately.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
and provide relevant evidence. A staff member will contact you within 5 working days.