1、 download mysql
mysql5.7 Official website address
Download the corresponding version of zip Installation package , And decompress it into disk

2、 stay mysql Create an initialization file under the root directory
- establish my.ini file (mysql Master profile )
- establish data Folder ( User initializes the database file )

- To configure my.ini file
[mysqld]
basedir=C:\Program Files\mysql-5.7.37
datadir=C:\Program Files\mysql-5.7.37\data\
port=3306
skip-grant-tablesbasedir and datadir Change it to your mysql In the folder ,skip-grant-tables To skip login verification
3、 Add environment variables
- edit Path System variables
<img src="https://gitee.com/peonytao/typora/raw/master/img/20220214093915.png" alt="image-20220214093913326" style="zoom:80%;" />
- Add you mysql In the folder bin File path

4、 Initialize database
- With Administrators Open the command line window , And into the mysql Of bin Catalog
- install mysql service
mysqld install- Initialize database
mysqld --initialize-insecure --user=mysql- start-up mysql service , Because the configuration file is set to skip verification , So you don't need to enter the user name and password
net start mysql- Get into mysql
mysql- Change Password , Refresh the permissions ; take New password Change it to your password ,root Username
UPDATE mysql.user SET authentication_string = PASSWORD(' New password ') WHERE user = 'root';- notes my.ini Skip login verification in

5、 complete , Log in with the user password mysql
- 123456 Change it to your password
mysql -u root -p123456






![[true topic of the Blue Bridge Cup trials 43] scratch space flight children's programming explanation of the true topic of the Blue Bridge Cup trials](/img/42/21f6d0fdd159faa8b63713624c95a2.png)
