Mysql installation of a variety of common problem solving methods _mysql

Source: Internet
Author: User

Small series for everyone to tidy up a lot of MySQL installation when a variety of common problems in the solution, for your reference, the specific content as follows

Question one:

When you install, reload when the could not start the service MySQL error:0
reason: uninstall MySQL did not completely remove the related files and services, need to manually clear.

Workaround When you install to the last step when execute does not start the service:

First of all, in the management tool-> service to the MySQL service to stop (some did not install successfully, have this service, but has stopped), Win+r->cmd, open a Command Prompt window, enter the command: SC delete mysql (view services, There is no MySQL in the service at this time, remove the stopped service, uninstall MySQL and remember to select Remove. Finally, the MySQL installation directory is deleted, and the directory of the database is also deleted.

Then, 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 MySQL phase key value (MySQL, mysqladmin) in the related directory
The registry of things about MySQL may be deleted not thoroughly, ctrl+f find MySQL, and then use the F3 Loop lookup, will be related to MySQL this software all about the deletion

Note: (Error deleting Item):
Cannot delete legacy_mysql51 (user name when you build database): An error occurred while deleting the item.
Solution: the registry key to increase the right key administrators all permissions, and then open 360 security guards or Jinshan guards clean up the registry!
Next, delete the MySQL data table directory (C:/Documents and Settings/all users/application data/mysql/mysql Server 5.1/data/) (Application Data is hidden and is set to display in the view
Win7 under the general C:\ProgramData\MySQL directory, note that programdata This folder is hidden by default),

Finally, restart the computer, reinstall MySQL, run the wizard Server Instance Configuration Wizard, and make the relevant settings.

question two: error nr.1045 problem during MySQL installation

The problem with access denied for user ' root ' @localhost ' (using Password:no) occurs when we install MySQL under Windows, because MySQL was previously installed on your machine, or this Install a new password at one time, enter the last step of the application for some reason card out or because the service is not started and other reasons that can not be configured successfully, the final result is that the configuration is not successful, password settings have been saved in. So we adjust the service, and so on, after the reconfiguration, we will find that when the password is set, an extra old password input box. In fact, this is nothing, in the password know, enter the old password to reset the password is not difficult, and the problem is that even if the old password is correct, you still can not complete the configuration, in the last link password Authentication time and error, the reason is the password problem, the old password is incorrect.


Solution:
1. Management Tools---Services to stop the MySQL service.
2. Control Panel---Uninstall MySQL, delete C:\Program files\mysql directory.
3. This is the most critical step, only to do the first two steps, the password is still not modified, because MySQL also has files, that is, in C:\Documents and Settings\All Users\Application Data ( Application data is a hidden folder inside the MySQL folder, this file is not clear is the MySQL reload the original source of the old password. The MySQL folder is then deleted.
4. Check the C:\WINDOWS directory to see if there are my.ini files, delete them
5. Heky_local_machine,software,mysql deletion in the registration list
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

By completing the steps above, you can reinstall MySQL and make a new configuration.

question three: cannot create Windows service for mysql.error:0 during MySQL5.1 installation

Installation MySQL5.1 process, I have previously MySQL5.0 GUI tools and servers all deleted, installation directory all deleted, data file directory name changed, the registry with the perfect uninstall clean.
Then reboot the installation MySQL5.1 (I've had a service that I've never started before) and you can configure the cannot create Windows service for mysql.error:0 error in the final step. Turn off the configuration tool to retry a few times, then Baidu, I heard that to the system administrator users under the implementation of SC delete mysql delete mysql service after the start Configuration tool configuration, it is not a reboot after the test.
I delete the service reconfiguration is still the same error, and then delete the service, reboot after the configuration or not.
Also on the Internet to refer to a number of articles, the final solution is as follows:

1. Turn off the configuration tool after the error, execute the command under the System administrator account:sc delete mysql(MySQL is the service name, according to your service name);

2. Delete the c:/documents and Settings/all users/application data/mysql/mysql Server 5.1/data directory ib_logfile0, Ib_logfile1 Two files deleted, incidentally, this directory has a err file, is named after the hostname, which contains the error message, similar to the following paragraph:

Innodb:the the specified data file E:/data/ibdata1 did not exist:
INNODB:A new database to is created!
090501 19:20:08 innodb:setting file e:/data/ibdata1 size to 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 ' registration as a STORAGE ENGINE.
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/mysql Server/bin/mysqld:shutdown complete

3. Delete the configuration when the specified data file directory, as if I can not immediately delete, I use unlocker delete when it said to be deleted the next time the reboot.
4. Reboot.
5. Start Configuration Tool configuration.

It was a success this time.

Thanks to the seniors who provided the information, and also to the friends who have the same mistakes.

Continue to clean up the MySQL installation of the reasons for the failure of the MySQL installation and the failure of the solution, to take a look at it!

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

1. Uninstall MySQL.

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

3. Re-install MySQL OK.

Difficulty 2: MySQL hint could not start the service MySQL hint

Installing MySQL 5.1.33 the third start service in the Execute configurattion step of the Run Server Instance Configuration Wizard error, error prompted by could not Start the service MySQL

Analysis: This situation is generally because of the installation of MySQL, uninstall is not clean caused by unloading after the restart and then reload. Note that if the service is not uninstalled, you can uninstall it with Mysqld-nt-remove .

The specific methods are as follows:

1. See if there is MySQL in the service, if there is to stop the service.

2. Run the Add Removal program in Control Panel to uninstall MySQL.

3. Open the registry after the uninstall, view the key values under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services, if there is a related MySQL key value (MySQL, mysqladmin) is deleted, you can.

4. Restart, the MySQL installation of the residual directory deleted (view service, at this time the service has no MySQL).

5. Reinstall MySQL. Do not run the Server Instance Configuration Wizard after the installation, and then run the wizard in the Start menu after the reboot.

Difficulty 3: msyql Install to last step start service error

1. To the control Panel to remove MySQL first.

2. To c disk C:\Program files directory to delete the MySQL directory.

3. If there is a set directory on the other disk also want to delete. Empty directories are also deleted.

4. To the Regedit 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 anything, delete all! ( tip: Use the F3 loop to find "MySQL") 5. If the MySQL content in Task Manager is also deleted.

5. Turn off the firewall.

6. Re-install MySQL (I don't have to restart my computer here).

Restart the computer, deactivate IIS, and delete temporary files in temp if necessary when reloading.

When you configure MySQL, replace the MySQL service with a service name.

Wonderful topic sharing: MySQL different versions of the installation Tutorials mysql5.7 version Installation Tutorials

The above is in the installation of MySQL often encountered errors, I hope this article for everyone's learning help.

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.