It is recommended to install the MySQL green version, what is the green version? Is the installation is free, download down is this
Create a folder in this directory/data for storing data,
Create a new My.ini file, My.ini inside the most basic configuration is as follows, My.ini configuration is more, the following is just a simple configuration, the path is my own path, the reader should modify their own path (this is not the old hand, only some novice will only copy and paste, Special Offer):
- [Mysqld]
- Basedir=f:\mysql-5.7.17-winx64
- Datadir=f:\mysql-5.7.17-winx64\data
- Port = 3306
- Character-set-server=utf8
- [MySQL]
- Default-character-set=utf8
Go to the Bin directory, copy the current directory, right-click on my Computer, properties, advanced system settings, environment variables, add Path:f:\mysql-5.7.17-winx64\bin, ok OK,
Create a service for MySQL: Create a bat file under the F:\mysql-5.7.17-winx64\ directory and enter:
- CD bin
- Mysqld--install mysql --defaults-file= "%~dp0my.ini"
- Pause
Save, double-click Run, close, create complete, run cmd, turn on MySQL
net start MySQL
The service name should be consistent, such as two shades of gray MySQL name to be consistent,
net stop MySQL off MySQL
The startup succeeds as shown in:
Start after the login, the first login no password, to give him to set the password, there are many ways to enter, no password entry, set the password into the way, and the following is the way to set the password enter:
CMD on CD to F:\mysql-5.7.17-winx64\bin directory, enter:
mysqladmin-u root-p Password root
Password:root
Enter the first sentence will let you lose the password, the second line of password, and then input root, but no display, such as the background color is the gray root, the return will pop up a word:
Warning:using a password on the command line interface can is insecure.
It is not safe for you to expose your password. Whatever he continues to enter in the bin directory: Mysql-u root-p
Password:root
This indicates that the login is successful:
Install MySQL5.6 green version under Windows