Mysql-8.0.17-winx64 deployment method

Time:2021-2-26

1. Download mysql8.0.17winx64 from the official website and choose zip file format to download

2. Unzip to the target path, I here is the e disk root directory, that is e: / / mysql8

3. Create in the root directory my.ini The contents are as follows:

[mysqld]
#Port
port = 3306
#MySQL installation directory
basedir = E:/mysql8
#MySQL data storage directory
datadir = E:/mysql8/data
#Maximum number of connections allowed
max_connections = 1024
#The server uses character set by default
character-set-server = utf8
#Default storage engine
default-storage-engine = INNODB
#Service unique identity
server_id = 1
#Enable slow query
slow_query_log = 1
#Specify the path and name of the slow query log file
slow_query_log_file = E:/amp/mysql8/data/mysql-slow.log
#SQL statements will not be recorded until they run longer than this value
long_query_time = 10
#Error log
log-error = E:/mysql8/data/mysql-err.log
#Open binlog log
log-bin = E:/mysql8/data/mysql-bin
#SQL mode
sql_mode = NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
#Note that the default password verification plug-in for mysql8 is changed to caching_ sha2_ password
#In order to be compatible with the previous, change back to MySQL_ native_ password
default_authentication_plugin = mysql_native_password
[mysql]
default-character-set = utf8
[client]
port = 3306
default-character-set = utf8

4. The administrator runs the CMD. First, enter CD, then E: to enter the e disk, and then enter the target bin directory, that is, e::? Mysql8? Bin

5. Implementation mysqld --initialize-insecure

6. Implementation mysqld --install mysql

7. Execute ﹣ net start mysql, indicating that the service has been started successfully, indicating that the MySQL service is OK

8. Command line input:

mysql -u root -p

You can log in successfully and prompt welcome to the MySQL monitor! The word “login” indicates successful login.

9. Close the current command line and restart cmd.exe

inputmysqladmin -u root -p password

enter,

When “enter password” appears, press enter directly. If no password is set, there is no password by default,

Then “new password” appears: enter the new password and press enter,

Then “confirm new password:” appears. Just press enter.

After changing the password, the next login is,

typingmysql -u root -pThen you can enter the set password to log in.

summary

The above is the deployment method of mysql-8.0.17-winx64 introduced by Xiaobian. I hope it can help you. If you have any questions, please leave me a message and Xiaobian will reply you in time. Thank you very much for your support to developer!
If you think this article is helpful to you, please reprint, please indicate the source, thank you!