Because I personally need to install MySQL in this machine, the installation process will be recorded as follows, I hope to have reference to others.
First, download software
1. Access to MySQL official website, landing their own Oracle account, download Mysql-5.7.14, download the address: http://dev.mysql.com/downloads/mysql/
2. The download of good files to the specified directory, the author decompression in C:\software\Mysql\mysql-5.7.14-winx64
Second, the installation process
1. Configure the environment variable path first, and configure the C:\software\Mysql\mysql-5.7.14-winx64\bin into its own path, which is not detailed again.
2. Copy the My-default.ini under the decompression path, and modify the name to My.ini as shown in the following figure.
3. Open file My.ini, add content as follows:
[Mysqld]
basedir=c:\\software\mysql\mysql-5.7.14-winx64
Datadir=c:\\software\mysql\mysql-5.7.14-winx64\data
port=3306
Where Basedir: is the above MySQL decompression path
DataDir: Subsequent initialization data will be saved in the directory, the new data folder in the file directory
Port : Indicates the port number of the connection database
III. initialization of database configuration related information
1. Run the Windows command line as an administrator
2. Access to the directory of MySQL decompression:
Reminder: You need to enter the bin directory here, otherwise there will be an error in subsequent operations.
3. Perform initialization, at which point the initial password for root will be generated as shown in the following figure:
Remember the initialization password that is generated at this time.
4. According to the quasi-MySQL service. Run command: mysqld--install MySQL
MySQL service successfully installed.
5. At this point, you can start the MySQL service, net start MySQL
The user may receive the following error: System error 2 occurred. The system could not find the specified file.
cause of the error: as described above, when running the Install Service command: mysqld--install MySQL, we did not enter the bin directory to install.
solution: go to the bin directory, first remove the service, run the command mysqld--remove
Reinstall the MySQL service and run the command mysqld--install
The MySQL service was successfully started at this time.
Four, login database, modify password
command Line Input mysql-u root-p, error description: 1045 (28000)
Workaround: add Skip-grant-tables in the My.ini file after [mysqld]
At this point, turn off the MySQL service and reboot.
Re-login:
Enter directly without entering a password.
Select MySQL Database:
Query the user table for the MySQL database, select * from user
At this point, we found that the password field name is authentication_string. Some may be password, according to the results of your query will prevail.
Perform an update operation on table User: Update user set authentication_string = password ("*******") where user= "root"
The operation was successful. Exit MySQL
Remove the skip-grant-tables from the My.ini file and restart the MySQL service.
Start-up success. At this point, MySQL was successfully installed in Windows.
Wonderful topic sharing: MySQL different versions of the installation Tutorials mysql5.7 version Installation Tutorials
This is the MySQL 5.7.14 installation configuration method, I hope to help you learn.