mysql8.0 version Compact installation tutorial

1, download mysql8.0 version archive and extract

2, the new my.ini file in the root directory

My.ini file contents of the file are as follows

Among them, the default port number 3306, will replace if necessary

Basedir value changes to your actual installation directory

basedir and datadir front part, as followed by the \ data

Other temporarily with a modified

[Client] 
port = 3306
[mysqld] 
port = 3306
basedir=D:\mysql\mysql-5.7.25-winx64
datadir=D:\mysql\mysql-5.7.25-winx64\data 
max_connections=200 
character-set-server=utf8 
default-storage-engine=InnoDB
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES 
[mysql] 
default-character-set=utf8 

3, a command to install manner mysql

Run as administrator cmd

Switch to bin directory, execute the command mysqld -install

Execute mysqld --initialize --console command, generates data folder in the root directory

The main role of the Executive mysqld --console --skip-grant-tables --shared-memory command, the command is executed without a password to log mysql

Another open a cmd window and change to the bin directory of mysql, mysql -uroot -p command execution, the password prompt output, not input, directly enter to log mysql

After logging in, execute the command flush privileges, and then execute ALTER USER 'root' @ 'localhost' IDENTIFIED BY 'ok'; command to change the password, which is ok password you want to set, and then execute the command flush privileges, you can successfully change passwords

Close all windows cmd

4, start mysql service and log

Open cmd window, enter the command net start mysql start mysql service

After the service starts successfully, the cmd switch to the bin directory of mysql, execute mysql -uroot -p, Enter, prompted for a password, then enter ok, you can log in mysql

If the login is successful, you can log in using mysql client tools, without the need to log in using the mysql command line

 

Published 89 original articles · won praise 67 · views 70000 +

Guess you like

Origin blog.csdn.net/xl_1803/article/details/102590286