MySQL command-line notes

When the initial installation of MySQL, change your password:

set password=password("root");

Refresh:

flush privileges;

use mysql;

View user

select host,user from user;

Mysql password to view the current strategy

show variables like 'validate_password%';

So that users can use any IP root

grant all privileges on *.* to root@"%" identified by "root";

Only the root user can create local use

grant all privileges on *.* to root@"localhost" identified by "root";

Guess you like

Origin www.cnblogs.com/devin-sl/p/12114495.html
Recommended