Uninstall MySQL And Install MySQL8.0.11

Uninstall MySQL:

1.Win+R 一> regedit,  delete files as below:

    HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Eventlog\Application\MySQL ,

    HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Services\Eventlog\Application\MySQL ,

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application\MySQL. 

2.delete C:\Users\Username of this machine\AppData\Roaming\Oracle\mysql.

3.find mysql decompression path and delete the whole folder of mysql.


Install MySQL 8.0.11

1.decompression msyql8.0.11.zip and create a new file named my.ini

2.enter some config as below: 

[mysqld]

# 设置3306端口

port=3306

# 设置mysql的安装目录

basedir=D:\mysql-8.0.12-winx64

# 设置mysql数据库的数据的存放目录

datadir=D:\mysql-8.0.12-winx64\Data

# 允许最大连接数

max_connections=200

# 允许连接失败的次数。

max_connect_errors=10

# 服务端使用的字符集默认为UTF8

character-set-server=utf8

# 创建新表时将使用的默认存储引擎

default-storage-engine=INNODB

# 默认使用“mysql_native_password”插件认证

#mysql_native_password

default_authentication_plugin=mysql_native_password

[mysql]

# 设置mysql客户端默认字符集

default-character-set=utf8

[client]

# 设置mysql客户端连接服务端时默认使用的端口

port=3306

default-character-set=utf8

3.msyqld --install

4.msyqld --initialize --console(you can see the initialized password)

5.net start mysql

6.update password :

ALTER USER "root"@"localhost" IDENTIFIED BY "new password";

你可能感兴趣的:(Uninstall MySQL And Install MySQL8.0.11)