This article mainly introduces in detail the graphic tutorial on the installation and configuration method of MySQL 5.7.21 decompressed version under win10. It has certain reference value. Interested friends can refer to it. I hope it can help everyone.
1. Download the MYSQL compressed file from the official website.
Download URL
2. Unzip the file
Decompress directly, and install the package directory after decompression As follows: (Note: There is no data directory and .Ini file at this time)
3. Put the file into the directory you want to put, the following is what I put Directory
4. Since there is no .ini file after decompression, create a new my.ini file in this directory
The content of the .Ini file is as follows:
[mysqld] port = 3306 basedir=C:\Program Files\MYSQL\MySQL Server 5.7.21 datadir=C:\Program Files\MYSQL\MySQL Server 5.7.21\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
Note two places:
The path is the path you put in step 3.
5. Configure environment variables
Open the control panel and select "Advanced System Settings"
In the pop-up Select "Advanced" in the tab, then select "Environment Variables"
Create a new "MYSQL_HOME" value in the system variable "C:\Program Files\MYSQL\MySQL Server 5.7. 21" (the path stored in step 3)
6. MYSQL installation
"Microsoft key + Q" to open search CMD
Run "Command Prompt" as administrator.
Enter the MYSQL directory cd C:\Program Files\MYSQL\MySQL Server 5.7.21\bin
Run mysqld --initialize
Run mysqld -install
Run net start mysql to start the service
7. Set the Root account password
Modify the MySQL configuration file (my.ini) and add a line skip-grant-tables under [mysqld]
Restart mysql After that, you can directly enter with mysql -u root -p (the password is empty at this time);
Enter update mysql.user set authentication_string=password("root") where user="root";
Enter flush privileges;
Enter quit;
Restore the my.ini file (delete the skip-grant-tables line) and restart mysql
You can use it at this time mysql -u root -p root entered
Note:
You may encounter the following errors during the installation process:
MySQL service cannot be started.
The service did not report any errors.
Please type NET HELPMSG 3534 for more help.
Processing:
Check whether data exists in the MYSQL directory and reinstall.
Enter sc delete mysql to delete the original MYSQL and repeat step 6
Related recommendations:
mysql5.7.21 winx64 installation configuration graphic sharing
mysql5.7.21.zip installation example tutorial
Detailed explanation of the steps to install MySql5.7.21 in Linux
The above is the detailed content of mysql5.7.21 decompressed version installation and configuration pictures and texts. For more information, please follow other related articles on the PHP Chinese website!