添加用户:
insert into mysql.user(Host,User,Password,ssl_cipher,x509_issuer,x509_subject) values ("192.168.186.1","allen",password("allen"),‘‘,‘‘,‘‘);
刷新:
flush privileges;
授权:
grant select on test.* to ‘allen‘@‘192.168.186.1‘;
刷新:
flush privileges;
查看授权情况
SHOW GRANTS FOR [email protected];
删除用户:
DROP USER [email protected];
时间: 2024-10-16 17:57:04