Solutions to various common problems during mysql Installation

Source: Internet
Author: User

Solutions to various common problems during mysql Installation

The editor provides you with solutions to various common problems during mysql installation for your reference. The specific content is as follows:

Question 1:

Cocould not start the service mysql error: 0
Cause:When you uninstall mysql, the related files and services are not completely deleted and need to be cleared manually.

The service cannot be started when the last execute step is installed.Solution:

First, stop the MySQL service in the management tools> Service (some services are not successfully installed, but stopped), win + R-> cmd, open the Command Prompt window, enter the command SC delete mysql (view the service, there is no mysql in the service), delete the stopped service, uninstall MySQL, and select remove. Finally, delete the MySQL installation directory and the database directory.

Enter regedit at the command prompt to open the registry.
In the Registry
HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services
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
Delete the key mysql values (mysql and mysqladmin) in the relevant directory
MySQL related items in the registry may not be completely deleted. ctrl + F is used to search for mysql, F3 is used to find all related items of the MySQL software.

Note:(An error occurred while deleting the item ):
Unable to delete LEGACY_MYSQL51 (username set during database creation): An error occurred while deleting the item.
Solution:Right-click the registry entry to add all the permissions for administrators, and then open  security guard or Kingsoft guard to clear the registry!
Then, delete the MYSQL Data Table directory (C:/Documents and Settings/All Users/Application Data/MySQL Server 5.1/Data/) (Application Data is hidden, set it to display in view
Generally, Windows 7 uses the C: \ ProgramData \ MySQL directory. Note that the ProgramData folder is hidden by default ),

Finally, restart the computer, reinstall mysql, run the wizard Server Instance Configuration wizard, and perform relevant settings.

Question 2:Error Nr.1045 during mysql Installation

When MySQL is installed in windows, the following error occurs: Access denied for user 'root' @ localhost' (using password: No, this problem occurs because you have installed mysql on your machine or configured a new password for this installation, in the last step of the application, the configuration failed due to some reasons such as out of the card or failed to start the service. The final result is that the configuration failed and the password settings have been saved. In this way, after adjusting the service and other reasons, when re-configuring, we will find that an old password input box is added when setting the password. In fact, this is nothing. It is not difficult to enter the old password and reset the password when you know the password. The key is that even if the old password is correct, you still cannot complete the configuration, in the last step, I encountered another error during password authentication. The cause of the error was the password problem, prompting that the old password was incorrect.


Solution:
1. Management Tools --- stop the Mysql service in the service.
2. Control Panel --- uninstall Mysql and delete the C: \ Program Files \ MySQL directory.
3. This isKeyIn one step, the password cannot be modified only in the previous two steps, because MySQL still has files, that is, in C: \ Documents ents and Settings \ All Users \ Application Data (Application Data is a hidden folder) in the MySQL folder, this file is not cleared is the root cause of the old password reinstalled in MySQL. Delete the MySQL folder.
4. Check whether the my. ini file exists in the C: \ WINDOWS directory and delete it.
5. Delete HEKY_LOCAL_MACHINE, SOFTWARE, and MYSQL in the registry.
HKEY_LOCAL_MACHINE \ SYSTEM \ ControlSet001 \ Services \ Eventlog \ Application \ MySQL directory Deletion
HKEY_LOCAL_MACHINE \ SYSTEM \ ControlSet002 \ Services \ Eventlog \ Application \ MySQL directory Deletion
HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ Eventlog \ Application \ MySQL directory Deletion

After completing the preceding steps, you can reinstall MySQL and perform new configuration.

Question 3:When installing MySQL5.1, the following error occurs: Cannot create windows service for mysql. error: 0.

During MySQL5.1 installation, I deleted all the previous MySQL5.0 GUI tools and servers, deleted all the installation directories, changed the Directory Name of the data files, and cleared the registry using the perfect uninstallation method.
Then restart and install MySQL5.1 (I have encountered a situation where the service Cannot be started before, and this will be done). You can configure Cannot create windows service for MySQL In the last step. error: 0: The Configuration tool is disabled and cannot be retried several times. Later, Baidu heard that it is necessary to execute SC delete mysql under the user of the system administrator to delete the MySQL service and then start the configuration tool configuration, it cannot be restarted, and then try again.
I deleted the service and then configured the same error, and then deleted the service. After the restart, the configuration still failed.
I also read some articles online. FinallySolutionAs follows:

1. if an error occurs, turn off the configuration tool and run the following command under the system administrator account:SC delete mysql(Mysql is the service name, which is determined by your service name );

2. Delete C:/Documents and Settings/All Users/Application Data/MySQL Server 5.1/dataIb_logfile0 and ib_logfile1Delete two files. By the way, there is an err file under this directory named after the host name, which contains the error message, similar to the following section:

InnoDB: The first specified data file E:/Data/ibdata1 did not exist:
InnoDB: a new database to be created!
090501 19:20:08 InnoDB: Setting file E:/Data/ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Error: log file./ib_logfile0 is of different size 0 48234496 bytes
InnoDB: than specified in the. cnf file 0 17825792 bytes!
090501 19:20:09 [ERROR] Plugin 'innodb' init function returned error.
090501 19:20:09 [ERROR] Plugin 'innodb' registry as a storage engine failed.
090501 19:20:09 [ERROR] Unknown/unsupported table type: INNODB
090501 19:20:09 [ERROR] Aborting
090501 19:20:09 [Warning] Forcing shutdown of 1 plugins
090501 19:20:09 [Note] E:/Program Files/MySQL Server/bin/mysqld: Shutdown complete

3. The data file directory specified when the configuration is deleted. It seems that my data file cannot be deleted immediately at the time. When I use unlocker to delete the directory, it says that it will be deleted at the next restart.
4. Restart.
5. Start the configuration tool configuration.

This is the success.

I would like to thank the elders who provided help information and hope to help those who encountered the same error.

Continue to sort out the cause of mysql installation failure and the solution to mysql installation failure. Take a look!

Difficulty 1:An apply security setting error is reported during MySQL 5.1 installation.

1. uninstall MySQL.

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

3. reinstall MySQL.

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

Install mysql 5.1.33. when running the Server Instance Configuration wizard, an error occurs in the third Start Service in the Execute restart attion step. the error message is "cocould not start the service MySQL ".

Analysis:This situation is generally caused by the installation of mysql and the uninstallation is not clean. After the uninstallation, restart and re-install it. Note that you can useMysqld-nt-removeUninstall.

The specific method is as follows:

1. Check whether mysql is in the service. If yes, stop the service.

2. Run the Add/delete program on the Control Panel to uninstall mysql.

3. Open the registry after uninstalling and view the key values under HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services. If there is a mysql key value (mysql, mysqladmin), delete it.

4. Restart and delete the residual installation directory of mysql (view the service, and mysql is no longer in the service ).

5. reinstall mysql. After installation, do not run Server Instance Configuration wizard. After restart, run the wizard in the Start Menu.

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

1. Delete mysql in the control panel.

2. Delete the mysql directory under drive C: \ Program Files.

3. If you still have a directory set on another disk, delete the. Empty directory.

4. Go to regedit to set 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 yes, delete all! (TIPS:Use F3 to search for "mysql") 5. If the mysql content in the task manager is also deleted.

5. Shut down the firewall.

6. reinstall mysql (I have not restarted the computer here ).

Restart the computer, disable IIS, and delete temporary files in temp if necessary.

If this is not the case, change the mysql service name When configuring mysql.

The above are common errors during mysql installation. I hope this article will help you learn more ..


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.