1. Baidu Cloud disk:
Pan.baidu.com/s/17ci5OcDf… Extraction code: 0WMQ
2 Put the decompressed content in your installation directory
Mine is on E disk: E:\mysql
As shown in the following figure, the compressed file does not contain the data directory or INI file
3. Create a my.ini file in E:\mysql and copy the following contents
Basedir =E:\mysql # set datadir=E:\mysql\data # set the maximum number of connections allowed Max_connections =200 # Latin1 character set character-set-server=utf8 # Default storage engine to be used when creating new tables Default-storage-engine =INNODB SQL_mode =NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES [mysql] # Set the default character set for mysql client default-character-set=utf8Copy the code
4. Configure environment variables:
Computer Properties – advanced System Settings –
Click on environment variables
In the system variables section, create a new variable named MYSQL_HOME with the value: E:\mysql
Set path and add the bin directory to path (note the semicolon;
MySQL > install MySQL
Run CMD as administrator, as shown below:
6 Detailed operations
Please copy the following code to your computer.
6.1 Running the Installation Service
mysqld --install
Copy the code
The console prompts “Services successfully Installed”
If the mysqld –install installation service already exists, please enter mysqld –remove to remove the previously installed mysql and run mysqld –install again
6.2 Running Commands (A Data directory is generated)
mysqld --initialize
Copy the code
6.3 Starting the Service
net start mysql
Copy the code
6.4 Changing a Password
6.4.1 (Stopping services)
net stop mysql
Copy the code
6.4.2 Starting the MySQL Server Without a password
mysqld --skip-grant-tables
Copy the code
6.4.3 Restart a CMD terminal and run it as the administrator
Enter the following code without entering the password, and directly press Enter
mysql -u root -p
Copy the code
6.4.4 Then change the password of user root to ‘root’
update mysql.user set authentication_string=password("root") where user="root";
Copy the code
6.4.5 Performing the Refresh Permission.
flush privileges;
Copy the code
6.4.6 Ending this operation
quit;
Copy the code
If the above is not clear, please see the red line operation process below
6.4.7 Entering the User Name Again Enter the password the password is root
mysql -u root -p
Copy the code
6.4.8 Change the Password again to 123456
SET PASSWORD = PASSWORD('123456');
ALTER USER 'root'@'localhost' PASSWORD EXPIRE NEVER;
flush privileges;
Copy the code
6.4.9 Open CMD again and log in again
mysql -u root -p 123456
Copy the code
And you’re done! 5.7.23 Database Installed Successfully!