Mysql new user, authorized to allow a user to access only the specified database
LocalHost version, can only be logged on locally using:
Insert into Mysql.user (Host,user,password) VALUES ("localhost", "test3", Password ("test3"));
Grant SELECT on ' Kuaibei '. * to [e-mail protected] identified by ' test3 ';
Flush privileges;
% version, any IP address can be logged in using:
Insert into Mysql.user (Host,user,password) VALUES ("%", "Test3", Password ("test3"));
Grant SELECT on ' Kuaibei '. * to [e-mail protected] "%" identified by ' test3 ';
Flush privileges;
-----------------------------------------------------------------------------------------------------
MySQL changes the root password???
Mysql-u Root
mysql> use MySQL;
mysql> UPDATE user SET Password = Password (' newpass ') WHERE user = ' root ';
mysql> FLUSH privileges;
MySQL Basic Operation