Mysql 5.7.13 winx64 installation and configuration tutorial, 5.7.13winx64
Summary of installing mysql5.7 in windows
Steps:
1. Download The mysql-5.7.13-winx64.zip package. Official http://mirrors.sohu.com/mysql/
2. decompress the package to the desired directory. I decompress the package to F:/opt to name the mysql-5.7.13-winx64 mysql
3. Change the my-default.ini TO my. ini.
Run the "" command to prompt the Administrator "to open cmd
To the mysql directory
1. initialize Configuration
Enter mysqld -- initialized to initialize the configuration.
There is no mysql directory and no data directory. Create a data directory under the mysql directory. F: opt \ data
Execute mysqld -- initialize again
Check whether the data directory is like this.
If not, uninstall the mysql installation package again, decompress the package, and start from step 1 again.
2. Create MySQL service mysqld -- install custom mysql service name
3. Enable the mysql service. net start mysql service name
4. log on to mysql and enter mysql-u root.
Login verification needs to be skipped
My-default.ini changed to my. ini. (Why does mysql execute my. ini without looking for a my-default.ini. It is modified only in the my-default.ini and will not be executed or succeeded)
Add skip-grant-tables to the last line of my. ini.
Restart mysql
Run mysql-uroot
5. Change the password
MySQL 5.7.6 and the latest version:
Copy codeThe Code is as follows: mysql> update user set authentication_string = PASSWORD ('000000') where User = 'root ';
MySQL 5.7.5 or earlier version r:
Copy codeThe Code is as follows: # mysql> update user set password = PASSWORD ('000000') where User = 'root ';
5.1 refresh the database
Flush privileges;
5.2 modify Internet Permissions
Accessible to all servers.
Copy codeThe Code is as follows: grant all privileges on *. * TO 'root' @ '%' identified by 'mypassword' with grant option;
If you can only access the server 192.168.13.56, change it
Copy codeThe Code is as follows: grant all privileges on *. * TO 'root' @ '192. 168.13.56 'identified by 'mypassword' with grant option;
5.3 remove my. ini's skip-grant-tables
Log on to mysql again
5.4 put the mysql directory in the path environment variable for convenience. F:/opt/mysql/bin
It can be opened in cmd.
After installing mysql, after logging on to mysql, no matter how many commands are runPromptThis mac mysql error You must reset your password using alter user statement before executing this statement.
Step 1: set password = PASSWORD ('your new password ');
Step 2: alter user 'root' @ 'localhost' password expire never;
Step 3: flush privileges;
Highlights: mysql installation tutorials for different versions
The above is all the content of this article. I hope it will be helpful for your learning and support for helping customers.