Small set up before the collation of the MySQL 5.7.9-free installation version of the configuration method to share to everyone for your reference, the specific content as follows
1. Extract the MySQL compression package
The download of the MySQL compression package to the custom directory, my extract directory is: "D:\Program files\mysql-5.7.9-win32"
A copy of the default file My-default.ini in the extracted directory, renamed My.ini
Copy the following configuration information to My.ini save
#如果没有my-default.ini, you can create your own new My.ini or get ######################################################### from somewhere else
[ Client]
port=3306
Default-character-set=utf8
[mysqld]
port=3306
Character_set_server=utf8
#解压目录
basedir=d:\program files\mysql-5.7.9-win32
#解压目录下data目录
datadir=d:\program files\ Mysql-5.7.9-win32\data
sql_mode=no_engine_substitution,strict_trans_tables
[winmysqladmin]
D:\ Program Files\mysql-5.7.9-win32\bin\mysqld.exe
#########################################################
2. Add Environment variables
The operation is as follows:
1 Right-click My Computer-> Properties-> advanced system settings (Advanced)-> environment variables
Click the New button under the system variable
Input variable name:mysql_home
Input variable value:D:\Program Files\mysql-5.7.9-win32
#即为mysql的自定义解压目录.
2 Select the path in the system variable
Click the Edit button to add the variable value to the variable value:%mysql_home%\bin
note that after the original variable value plus this variable, with;
3.
1 from the console into the MySQL extract directory under the bin directory:
2 Enter the service installation command:
1. Mysqld--console
2. Mysqld--initialize
3. Mysqld Install
after the installation is successful, the service installation is prompted to succeed.
#注: #执行这几步 because there is no Data folder in MySQL5.7.9, you need to generate the data folder with these commands
#移除服务命令为:mysqld Remove
4. Start MySQL Service
method One: start the service command for: net start MySQL
Method Two:
Open the admin tools service and find the MySQL service.
Start the service by right-clicking on the startup or clicking on the left side of the boot directly.
5. Change the password of root account
when successfully entered the service, with mysql-u root-p carriage return, enter the password, appear:
ERROR 1045 (28000): Access denied for user ' root ' @ ' localhost ' (using Password:no)
Turn off service net stop MySQL
Open in Safe mode,mysqld--skip-grant-tables
At this point, the cursor will always flash. Note, do not move, open another command line window.
6. the same operation as before came to the bin directory, login mysql-u root-p, the password is empty, direct return; you can go in then use MySQL;
(Perhaps the previous version of the password is password,5.7.11 is authentication_string, you can select * from user, view)
(old version) update user set Password=password ("123456") where user= "root";
(5.7.11) Update user set Authentication_string=password ("123456") where user= "root";
In the end, flush privileges is OK.
7 finally login to try.
Just start to fail, is the English mysqld process is still open, kill off on the line.
Finally, the root password was successfully modified.
Wonderful topic sharing: MySQL different versions of the installation Tutorials mysql5.7 version Installation Tutorials
This is the MySQL 5.7.9 installation configuration method, I hope to help you learn.