MySQL installation common errors and solutions

Source: Internet
Author: User
Tags administrator password mysql command line

error 1:wizard installation Last page, cannot create Windows service for mysql.error:0 appears Error

Workaround: Open the command line input sc delete mysql command
C:>SC Delete MySQL
[SC] DeleteService SUCCESS
Restart the computer, or uninstall and restart the installation, so it's OK. I restarted it after uninstalling.

Uninstall reinstall to pay attention to a problem, after uninstalling in the Control Panel, go to c:\Documents and Settings\All Users\Application The data directory to delete the MySQL folder. It may contain information about the configuration you uninstalled and will affect the next time you install it.

   Error 2: There is a line of current password in addition to password and Confirm password when the input administrator enters the password.

This means that you have not removed the MySQL folder from the directory I mentioned in 1th before you installed it. Do not know whether to affect the subsequent use, may remember the password is OK. Another sentence, the administrator password is set by itself, the user name is the default root.

after successful installation, you can test the following: Open MySQL command line client, enter the password, appear
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.
mysql>
the installation is successful!

   Error 3:mysql Server configuration failed.

The following statements are available in the Configuration Wizard to view the error message:
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.

View the installation log to find the following statement:
Mysql-installer information:10:attempting To create firewall rule with Command:netsh.exe Firewall add PortOpen ing 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= "Por T 3306 "Protocol=tcp localport=3306 dir=in action=allow.

This situation indicates that the installation of MySQL does not support the Chinese system, does not recognize the "OK" information returned by Netsh.exe, and then runs the Netsh.exe advfirewall command that can run on other Windows platforms (the command XP does not support Therefore, the report could not find the error of the command.

There are two solutions:
① Set the language of your operating system to English, and then reinstall MySQL. The specific can go to the Control Panel, area and language to change; Also, check that the current user has permission to start the firewall, view the properties of the application Layer Gateway service in the computer service, and see if the user on the Logon tab is the current user.
② Check the firewall port, if it has been added successfully, do not process, if not added successfully, you manually add the port in the firewall.

   Error 4: After successful installation, MySQL server can only be connected via MySQL 5.5 command line client to localhost, but not remotely via Workbench or other client tools.

Keyword: You cannot connect to MySQL server remotely.

Possible causes:
① There are no openings, see the previous fix.
② User is not authorized to connect remotely.
③mysql server does not allow remote connections.

for ② users who do not have an authorized remote connection, you can authorize the user, such as the default root user, to enter the following command in the MySQL 5.5 command line client:
//Select Database
mysql>use MySQL;
//Give the user authorization, YourPassword field with your password instead
mysql>grant All priileges on * * to identified by ' YourPassword ';
//Refresh System Permissions Table
Mysql>flush privileges;

//See if authorization is successful
mysql> show grants for roots;

If a recent authorization appears, it is successful. If you don't succeed, add a new user and add a user's command:
INSERT INTO Mysql.user (host,user,password,ssl_cipher,x509_issuer,x509_subject) VALUES ("%", "NewUser", Password ( "NewPassword"), ' , ', ', ')

The workaround for ③mysql server not to allow remote connections is to find your own My.ini and add a line of statements under [MYSQLD]:
bind-address=0.0.0.0
indicates that the IP is not bound and restarts your MySQL service.


   Error 5: Location of configuration file My.ini

The MySQL Configuration Wizard places the My.ini file in the installation directory of the MySQL server. This will help to associate the configuration file with the specific server instance. To ensure that the MySQL server knows where to look for the My.ini file, parameters similar to the following will be passed to the MySQL server as part of the service installation:--defaults-file= "C:\Program files\mysql\mysql Server 5.5\my.ini C:\Program files\mysql\mysql Server 5.5 can be replaced by the installation path that points to the MySQL server.

Edit My.ini: You can use a text editor to open the file and make the necessary edits and modifications. You can also modify the server configuration with the MySQL administrator application. MySQL clients and applications, such as the MySQL command-line client and mysqldump, are not able to determine the location of the My.ini file located in the server installation directory. In order to configure the client and the application, depending on your version of Windows, generate a new file My.ini file under C:\Windows or in the C:\WINNT directory

If your MySQL Configuration Wizard discovers an existing My.ini file, you can reconfigure the existing server, or remove the server instance by removing the My.ini file, stopping and removing the MySQL service. Reconfigure the server that already exists, select the RECONFIGURE instance option and select the Next button. An already existing My.ini file is renamed to Mytimestamp.ini.bak, and the timestamp is the date and time that the My.ini was created when it existed. Remove the existing DB instance, select the Remove Instance option and select the Next button. If the "Remove instances" option is selected, go to the confirmation screen. Click the Run button: the MySQL Configuration Wizard stops and starts removing the MySQL service and deletes the My.ini file. However, the server installation directory is not removed. If you selected the RECONFIGURE instance option, you can choose to install the type of installation you want to configure by entering the configuration type interface.

See: http://c.biancheng.net/cpp/html/1464.html

MySQL installation common errors and solutions

Related Article

Contact Us

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: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.