Home  >  Article  >  Database  >  Detailed steps to reinstall MySQL

Detailed steps to reinstall MySQL

小云云
小云云Original
2017-12-06 09:09:366123browse

If we have problems connecting MySQL and Qt, and we have no choice but to replace 64bitMySQL with 32bitMySQL, but various problems occur during the installation process, what should we do? In this article, we will share with you the steps to completely uninstall and reinstall MySQL under win10.

Step one: Stop the service

Start cmd->Enter services.msc->Find mySQL->Stop SQL service

Step 2: Delete files

Find your installation directory and delete all files

Step 3: Delete the registry

Start cmd-> Enter regedit-> Search for mySQL, right-click to delete all (or find MySQL according to the following path, right-click to delete)

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

Step 4: Configure the my.ini file

The version I downloaded is mysql-5.6.17-win32 , zip archive, stored in D drive

Create a new my.ini file in the D:\mysql\mysql-5.6.17-win32\ directory and write the following code:

[mysql] 
# 设置mysql客户端默认字符集 
default-character-set=utf8 
[mysqld] 
#设置3306端口 
port = 3306 
# 设置mysql的安装目录 
basedir=D:\mysql\mysql-5.6.17-win32 
# 设置mysql数据库的数据的存放目录 
datadir=D:\mysql\mysql-5.6.17-win32\data 
# 允许最大连接数 
max_connections=200 
# 服务端使用的字符集默认为8比特编码的latin1字符集 
character-set-server=utf8 
# 创建新表时将使用的默认存储引擎 
default-storage-engine=INNODB

Note that the directory address should be replaced with your own mySQL storage address.

Step 5: Installation

Open cmd (note to run as administrator) ->Enter cdD:\mysql\mysql-5.6.17-win32\ bin

If you enter mysqld install, the following error will appear:

Prompts that the service has been installed.

So, next we need to continue to enter mysqld -remove

to prompt the command to run successfully.

Re-enter mysqld install:

Reinstallation successful!

Enter net start mysql:

prompts successful startup.

The above content is a tutorial on the steps to completely uninstall and reinstall MySQL under win10. I hope it can help everyone.

Related recommendations:

Notes on reinstalling MySQL

Problems encountered by beginners when reinstalling mysql_MySQL

Teach you how to reinstall the MySQL database correctly

The above is the detailed content of Detailed steps to reinstall MySQL. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn