Uninstall and install the MySQL database
MySQL's completely uninstall
Because I do not know what the reason, there are two versions of the computer mysql the same time, so I decided to uninstall reinstall, but everyone says that MySQL is difficult to clean, so specifically to find a method to completely uninstall MySQL.
First, shortcuts win + r type regedit into the registry, find the HKEY_LOCAL_MACHINE \ SYSTEM \ ControlSet001 \ Services \ Eventlog \ Application \ MySQL folder deleted.
Delete HKEY_LOCAL_MACHINE \ SYSTEM \ ControlSet002 \ Services \ Eventlog \ Application \ MySQL folder.
Delete HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ Eventlog \ Application \ MySQL folder.
If there are two registry files, delete, not even the
then local service or Task Manager, turn off the MySQL:
Finally, delete the mysql installation position;
Some versions need to go to C: \ Program Files (x86) folder to find the MySQL folder (may be hidden), and then delete it.
Unfortunately, at that time I did not have time shots ....
You may experience permission issues when you delete a file, remember to change it permission, if there are, they entered into a delete a folder (I do not know why this can be deleted).
So far, congratulations you have completely deleted the MySQL.
MySQL8.0 installation tutorial
Although there are still a majority of people still using MySQL5.x version may be worried about copyright or other issues now, but I still have to install the latest version of MySQL8.0!
8.0 version of the installation and the previous versions, the following is a detailed process:
First, we enter Download MySQL official website: https: //dev.mysql.com/downloads/mysql/
As a reminder, you can download the first one, do not go to the next second! Do not believe their own under the play -
After decompression, the new data folder, my.ini (yes, free installation)
Editing my.ini file, there are two need to amend its own
[mysqld] # 设置3306端口 port=3306 # 设置mysql的安装目录 basedir=D:\\mysql-8.0.17 # 设置mysql数据库的数据的存放目录 datadir=D:\\mysql-8.0.17\\data # 允许最大连接数 max_connections=200 # 允许连接失败的次数。这是为了防止有人从该主机试图攻击数据库系统 max_connect_errors=10 # 服务端使用的字符集默认为UTF8 character-set-server=utf8 # 创建新表时将使用的默认存储引擎 default-storage-engine=INNODB [mysql] # 设置mysql客户端默认字符集 default-character-set=utf8 [client] # 设置mysql客户端连接服务端时默认使用的端口 port=3306 default-character-set=utf8
Configure the environment variables (not on Baidu)
Bin directory has an administrator interface to enter cmd, enter the mysql, followed by input:
net stop mysql to stop the service
mysqld --initialize --console initialized (here generates a random password for root form:
root@localhost:这里是密码
)mysqld.exe -install installation
net start mysql start the service
mysql -uroot -p password pasted above
Into mysql, began to change the password:
alter user user() identified by 'password'
Change the current user's password
You can collect spare oh ~