mysql-5.7.26-winx64 mounting step

First, extract it to a directory you want to install, I unzipped is D: \ Program Files (taking into account the long-extracting file names from so I named)

 

 

 

Second, add an environment variable

My Computer -> Properties -> Advanced -> Environment Variables

Select the PATH, add it back: your mysql installation file following the bin folder

(如: D:\Program Files\mysql-5.7\bin )

 

(Be careful not to remove the other stuff)

Third, create a new my.ini file

 

 

 

Fourth, edit my.ini file

[mysqld]

basedir=D:\Program Files\mysql-5.7\

datadir=D:\Program Files\mysql-5.7\data\

port=3306

skip-grant-tables

represents mysql installation path #basedir

#datadir represent mysql data file storage path

#port expressed mysql port

# Skip-grant-tables omit the password

 

 

 

Five, the CMD in the administrator mode starts, and the path is switched to the bin directory mysql, then enter

mysqld –install

 

 

 

Six, enter mysqld --initialize-insecure --user = mysql; initialization data file

 

 

 

Seven, enter net start mysql start mysql service

 

 

 

Eight, then start again and then use the command mysql -u root -p enter mysql mysql management interface (password can be empty)

 

 

 

Nine, change the root password into the interface

update mysql.user set authentication_string=password('123456789') where user='root' and Host = 'localhost';

Ten, the last input flush privileges to refresh authority

 

 

XI, modify my.ini file to delete the last sentence of skip-grant-tables

 

 

 

XII restart mysql normal use

 

Guess you like

Origin www.cnblogs.com/cuixiaojian/p/11583749.html