windows10 replace mysql8.0.17

Download windows version of mysql

 

Create a mysql my.ini initialization file and data files unzip folder to store data

my.ini content

[mysqld] 
# 3306 port disposed 
Port = 3306 
# mysql installation directory setting 
the basedir = D: \ javaDevlepTool \ mysql \ mysql-Windows-Service-\ mysql-8.0.17- Winx64 
# mysql database setting data storage directory 
DATADIR = D : \ javaDevlepTool \ MySQL \ MySQL-Windows--Service \ MySQL-8.0.17- Winx64 \ Data 
# the maximum number of connections allowed 
max_connections = 200 is 
# allowed number of connection failures. This is to prevent someone from trying to attack the host database system 
max_connect_errors = 10 
# character set used by the server by default UTF8 
Character -set-Server = utf8 
default storage engine that will be used when creating a new table # 
default -storage-Engine = INNODB 
[mysql] 
# mysql client set the default character set 
default -CHARACTER-sET = UTF8
[Client]
# Set the port to connect the server using the default mysql client 
Port = 3306
 default -CHARACTER-the SET utf8 =

Then configure the environment variable to point to the directory

As an administrator cmd window open jump path to E: \ mysql-8.0.11-winx64 \ bin (direct holding down the shift key in the directory Right-click here to open the windows powershell)

  • Initialization commands:. \ Mysqld --initialize --user = mysql --console will initialize the mysql and generate a temporary password to remember

 Next it is to enter service mysqld -install be added

net start mysql start the service

Log in with temporary password

 Change password: ALTER USER root @ localhost IDENTIFIED BY '123456'; Change password is: 123,456

This time with sqlyog connection error: error 2058 plugin caching sha2_password could not be loaded

ALTER USER'root '@' localhost 'IDENTIFIED BY' root 'PASSWORD EXPIRE NEVER; # modify the encryption rule 
ALTER USER'root' @ 'localhost' IDENTIFIED WITH mysql_native_password BY '123456'; # update about the user's password 
FLUSH PRIVILEGES; # refresh permission
again connected, the connection is successful

 

Guess you like

Origin www.cnblogs.com/xiaoyao-001/p/11294421.html