MySQL 5.7 zip version installation

0. Download and unzip the zip version of mysql

1. Add the path of the environment variable path D:\mysql-5.7\bin;

2. Add the data folder in D:\mysql-5.7\

3. Modify the my-default.ini configuration file

basedir = D:\mysql-5.7

datadir = D:\mysql-5.7\data

tmpdir = D:\mysql-5.7\data

port = 3306

server_id = 1

4. The administrator runs cmd.exe to enter the drive letter where mysql is located

cd D: \ mysql-5.7 \ bin

mysqld -install

mysqld --initialize

net start mysql

mysql -u root -p

 

5. Refer to the password generated in the last line of the D:\mysql-5.7\data\zht-PC.err file and enter it

如:[Note] A temporary password is generated for root@localhost: <iaHT5eHlQp_

 

6. Change the password

mysql> set password for root@localhost = password('sa');

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326442183&siteId=291194637