Today want to reload MySQL database, originally thought quite simple one thing, accidentally be stuck, record, later reload do not use on the
To reinstall MySQL, um, first you have to have a MySQL installation package.
Then do the following things.
1. Turn off the MySQL service. (My system is WIN7)
Start--Control Panel--management tools--services
Find MySQL, mysqla two items, right-click Properties, Startup Type, disable, service status, stop.
Normally stop is OK, but do not know why only stop the use, restart the computer and then become a running state. Simply disable it, anyway, on one of the options for things.
2. Back up MySQL database data.
Data backup, this is not much to say.
3. Uninstall MySQL.
Start--Control Panel--Programs and functions
Locate MySQL server and right-click Uninstall.
4. Delete the MySQL residue files.
Find MySQL before installing the folder, the entire folder is deleted.
Generally, there are two folders, C:\Program Files\mysql and C:\ProgramData\MySQL. I used the default path when I installed it. Note that C:\ProgramData is a hidden folder, you can not see the tool-Folder Options-Check the "Show hidden files, folders and drives".
5. Delete the registry residue files.
Start-run--regedit
Find Hkey_local_machine\system\controlset001\services\eventlog\application\mysql and delete it.
Find Hkey_local_machine\system\controlset002\services\eventlog\application\mysql and delete it.
Find Hkey_local_machine\system\currentcontrolset\services\eventlog\application\mysql and delete it. (Sometimes it doesn't exist, then it doesn't matter.)
Well, it's already been removed, and then you know it.
6. Restart your computer.
7. Double-click the MySQL installation package.
"MySQL" clean delete mysql, no error reload