Completely uninstall and reinstall MySQL under Win7

Source: Internet
Author: User
Tags mysql version uuid

1. Purpose: After the first installation of MySQL forgot the temporary password, through a variety of ways can not change the password, so you have to uninstall MySQL.

2. Recommendation: The first time you install MySQL will be assigned a temporary password, such as the last line of SE_:J<TQF1SL, it is recommended to first write down the password after entering MySQL and then modify the MySQL password. This eliminates the hassle of uninstalling and reloading MySQL, reducing the amount of tasks.

E:\mysql\mysql-5.7.22-winx64\bin>mysqld--initialize--user=mysql--console
2018-05-21t04:59:10.998089z 0 [Warning] TIMESTAMP with implicit DEFAULT value is
Deprecated. --explicit_defaults_for_timestamp server Option (see doc
Umentation for more details).
2018-05-21t04:59:11.973145z 0 [Warning] innodb:new log files created, lsn=45790

2018-05-21t04:59:12.793191z 0 [Warning] innodb:creating FOREIGN KEY constraint
system tables.
2018-05-21t04:59:13.216216z 0 [Warning] No existing UUID have been found, so we a
Ssume that's the first time that this server has been started. Generating
A new uuid:b482a83b-5cb3-11e8-ac0e-208984fa726e.
2018-05-21t04:59:13.311221z 0 [Warning] Gtid table is not a ready-to-be used. Tabl
E ' mysql.gtid_executed ' cannot be opened.
2018-05-21t04:59:13.361224z 1 [Note] A temporary password is generated for [email protected]
Localhost:se_:j<tqf1sl

3. Uninstall steps:

Enter the following command in CMD before uninstalling.
net stop MySQL//stop service

SC Delete mysql//delete MySQL

(1). To the C disk C:\Program files directory to remove the MySQL directory. (This directory is your previous MySQL installation directory, you may be in the D disk or something).

If the service is used to remove the installation directory after the recommended restart, if it cannot be deleted, you can delete the installation folder by using the command to open the DOS window with administrator privileges on the C-drive/windows/system32/cmd.

    • To delete a file or directory cmd command:

rd/s/q drive: \ A folder (forcibly deleting all files in the file folder and folder)
del/f/s/q: \ File name (force delete file, filename must be appended with file suffix)

    • Delete file or directory Bat command:

New. Bat batch file Enter the following command, and then drag and drop the file you want to delete onto the batch file icon to delete it.
del/f/a/q
RD/S/Q

(2). If you have a directory on another disk, you also want to delete it. Empty directories are also deleted.

(3). Delete the registry to Regedit

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 all (tip: Find "MySQL" with F3 loops)

4. Reinstall MySQL Recommendations

After reinstalling MySQL, if it is still the original version, the installation information will still overwrite the original, so the initialization of the database is still original, it is recommended to replace the original path or MySQL version. The following is my original installation of the MySQL path and reload after the MySQL path (no error)

Original installation: E:\MYSQL\mysql-8.0.11-winx64

Reload: E:\MYSQL\mysql-5.7.22-winx64

5. Problems encountered during installation

(1). You need to use these 3 files to install MySQL, in order to avoid confusing the best backup copy. During the installation process I mixed up these three folders, the installation process prompts a variety of errors, and then removed all these files from other computers (the same system win7/x64 copy the same file after the installation success)

C:\Windows\System32\ MSVCR120.dll

C:\Windows\System32\msvcr120.dll

C:\Windows\System32\msvcr120_clr0400.dll

(2). Note that the download version should be consistent with the operating system (Win32 and Winx64 to distinguish)

(3). System environment variables to be consistent

(4). The installation directory and storage directory in the My.ini content are consistent with the MySQL installation directory

6.windows install MySQL's blog path (Win7&win10 has been verified and can be installed successfully).

Install MySQL Blog link:

Http://www.cnblogs.com/Qtoken/p/9008296.html

Completely uninstall and reinstall MySQL under Win7

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.