Login command: Mysql-uroot-proot
Select User,host,password from Mysql.user;
2, Mysql>grant all privileges on * * to ' root ' @ '% ' with GRANT OPTION
Give any host access to data
For example, if you want to myuser use MyPassword to connect to a MySQL server from any host.
GRANT all privileges on * * to ' myuser ' @ ' percent ' identified by ' MyPassword ' with GRANT OPTION;
If you want to allow users to connect to the MySQL server from a host myuser IP 192.168.1.6 and use MyPassword as the password
GRANT all privileges on * * to ' myuser ' @ ' 192.168.1.6 ' identified by
' MyPassword ' with GRANT OPTION;
flush Privileges; the essence of the command is to extract the user information/permission settings from the current users and Privilige tables from the MySQL library (the built-in library of the MySQL database) into memory. MySQL user data and permissions have been modified, you want to "do not restart the MySQL service" in the case of direct effect, then you need to execute this command. Usually after you modify the root account settings, afraid to restart after the login can no longer, then directly after the flush to see whether the permissions are set to take effect. Without risking too much.
This article is from the "Nothing-skywalker" blog, please be sure to keep this source http://tianxingzhe.blog.51cto.com/3390077/1653644
Host * is not a allowed to connect to this MySQL server