windows under mysql8.0.x simple installation!

1. mysql official website to download the installation package and extract to your favorite directory

2. In the extracted directory, add my.ini configuration file, as follows:
[mysqld]
# set port 3306
port = 3306
set the mysql installation directory # is my installation directory, replaced his
basedir = D: \ mysql \ mysql-8.0.17-winx64
data provided # mysql database storage directory
DATADIR = D: \ mysql \ mysql-8.0.17-winx64 \ the data
# the maximum number of connections allowed
max_connections = 200 is
# allowed number of connection failures.
= 10 max_connect_errors
# server-side character set used by default to utf8
Character-the 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 default connection server mysql client port
Port = 3306
default-Character-SET = UTF8

3. Go to the C: \ Windows \ System32 directory, open cmd.exe with Administrator

4. Run CD / D D: (window10 the next to a directory, this operation) \ bin mysql \ mysql-8.0.17 -winx64 \ bin directory switched into the mysql

5. Perform initialization mysqld --initialize --console mysql database (root generates a temporary password for the user, being the first down, to get rid of the back)

6. Do mysqld install installation command

7. The Executive net start mysql start the service, prompt service starts successfully, you can connect to the mysql database

8. Log mysql: local mysql -u root -p password after you press Enter, successful landing.

9. Change Password:
Note: When using 8+ when more than MySQL, navicat premium connection mysql database, will report 2059 errors;
Reason: The password encryption rules 8+ version of caching_sha2_password.
Solution: mysql user login password encryption rule reduced to mysql_native_password

Therefore, use the following command to change the password:
the ALTER the USER 'root' @ 'localhost' IDENTIFIED BY the WITH mysql_native_password '123456'; # update about the user's password 
FLUSH PRIVILEGES; # refresh permission

(A problem connecting to mysql database navicat premium, inquired about the reasons above)

Problem: using conventional methods to modify the password in cmd window above can be logged in premium can not log navicat, and this encryption rule What is the connection? ? ?

 

Guess you like

Origin www.cnblogs.com/joeking/p/11421837.html