1. Go to the official website: D:\mysql-5.7.21-winx64\bin to download 2. Unzip to drive D (personal preference): D:\mysql-5.7.21-winx64 3. Configure environment variables, path: D:\mysql-5.7.21-winx64\bin 4. Check whether the following two configuration paths of the D:\mysql-5.7.21-winx64\my-default.ini file are correct [mysqld] basedir=D:\mysql-5.7.21-winx64 datadir=D:\mysql-5.7.21-winx64\data basedir-----mysql directory datadir-----mysql directory\data (the data directory is not found in the installation path D:\mysql-5.7.21-winx64, so I created it myself!! However, there will be problems if I create it myself. See step 5 for the problem, so we only need to configure this path and do not need to create the data folder ourselves) If there is no default.ini file, you can create one yourself and paste the above content 5. Install mysql. Run cmd as an administrator, switch to the bin directory of MySQL installation, and execute the installation statement Enter the command cd D:\mysql-5.7.21-winx64\bin to enter the bin root directory of mysql; (Note: If this command cannot be executed successfully, execute D: first, and then execute cd mysql-5.7.21-winx64\bin after successfully switching directories) (It's been so smooth up to this point?? It's all an illusion!!!) In fact, it is because you created the data directory yourself in the fourth step, and there is no table structure configuration file required for MySQL startup. The solution is as follows: First delete the data directory you created, then execute mysqld --initialize-insecure in the bin directory of mysql (do not set the root password), and then start it successfully. After executing mysqld --initialize-insecure, you can see that the data directory is automatically generated under the installation directory and contains many files. Restarting can start successfully: 6. Check whether you can log in: mysql -u root -p. Since no password is set, you don’t need to enter a password for the first login. Just press Enter to log in successfully. After setting the password, you need to modify the password reference: ALTER USER @'localhost' IDENTIFIED BY ' New Password ' PASSWORD EXPIRE NEVER;-- The password will never expire. If you remove NEVER, it will have an expiration date. The above is a detailed integration of the installation steps of the MySQL decompressed version introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: Analysis of the implementation principle of Vue instructions
>>: Linux's fastest text search tool ripgrep (the best alternative to grep)
1. Introduction Since pictures take up a lot of s...
Introduction to jQuery The jQuery library can be ...
Table of contents 1. Troubleshooting and locating...
In the previous article, after configuring the we...
Execute the command: docker run --name centos8 -d...
Definition of Float Sets the element out of the n...
This article example shares the specific code of ...
iOS 1. URL scheme This solution is basically for ...
Table of contents Loop - for Basic use of for loo...
Code implementation: Copy code The code is as fol...
Specific method: Step 1: Stop the mysql service /...
Table of contents 1. Prototype mode Example 1 Exa...
This article example shares the specific code of ...
mysql accidentally deleted data Using the delete ...
This article uses examples to explain the Nginx c...