1. 程式人生 > >mysql 增加使用者

mysql 增加使用者

新增使用者:

CREATE USER ‘test’@’%’ IDENTIFIED BY ‘test’;

增加許可權:

GRANT ALL ON *.* to ‘test’@’%’ identified BY ‘123456’;
或 grant all privileges on *.* to ‘test’@’%’ identified by ‘123456’;

重新整理:

flush privileges;

刪除使用者:

DROP USER ‘test’@’%’;

如果登入報錯,刪除匿名使用者即可。