windows 10 Extracted MySql Installation Configuration Method Tutorial

  • 2021-09-16 08:22:06
  • OfStack

Install Extracted MySql Database under windows 10

Step 1: Extract the zip file to (my) D:\ MyGreenSoftware\ mysql-5. 7.10-winx64

Step 2: Add Environment Variables (Windows 10 OS): Right-click the computer- > Attributes- > Advanced System Settings- > Environment variable find path and edit path to add at the end; D:\ MyGreenSoftware\ mysql-5. 7.10-winx64\ bin

Step 3: Add the configuration file. Under the extracted directory of MySQL (for example, mine is D:\ MyGreenSoftware\ mysql-5. 7.10-winx64), find the my-default. ini file and add it

(Create your own data folder under D:\ MyGreenSoftware\ mysql-5. 7.10-winx64\ data)


[mysqld]
basedir=D:\MyGreenSoftware\mysql-5.7.10-winx64
datadir=D:\MyGreenSoftware\mysql-5.7.10-winx64\data 
port = 3306

If you don't find the my-default. ini file, create a my. ini file by yourself (first create an txt file, add the above four lines of code to save and then change the file suffix to ini). Create a new text file txt and name it my. ini (note that the extension should also be modified).

Step 4: Initialize the database, open CMD as an administrator and execute the following command (enter cmd and right-click to run the following command as an administrator) mysqld initialize user=mysql console

Console appears: [Note] A temporary password is generated for root @ localhost: XXXXXXX
XXXXXX is a randomly generated password (copy it and save it)

Step 5: Add MySQL to the system service, open CMD as an administrator and execute the following command
mysqld install MySQL and then execute net start MySQL console and the service starts successfully

Step 6: Change the password (just generated is a random string that is difficult to remember, and then change it to be easy to remember)
Execute the command mysql-u root-p Enter in the CMD console, and enter the random password just saved. After successful execution, the console will display mysql >
Then execute set password for root @ localhost = password ('123456');
Your password has been changed to 123456


Related articles: