mysql用户

update mysql.user set Password = PASSWORD('密码') where User = 'root';

flush privileges;

select password('密码');

create user '用户名'@'主机名' identified by '密码'

grant all on *.* to '用户名'@'主机名';

grant select,insert on *.* to '用户名'@'主机名';

grant all on db.* to '用户名'@'主机名';

grant select,insert on db.* to '用户名'@'主机名';

SHOW GRANTS FOR 'admin'@'localhost';

CREATE USER 'repl'@'%.mydomain.com' IDENTIFIED BY '密码';


GRANT 权限 ON 对象 TO 用户账号 IDENTIFIED BY '密码';


REVOKE 权限 ON 对象 FROM 用户账号;



你可能感兴趣的:(mysql,用户)