Mysql创建用户、授权

Categories: /


创建用户

create user 'username'@'localhost' identified by 'password';

username:用户名

localhost:本地使用,%:任意使用

password:密码

授权

grant all on *.* to 'username'@'localhost' identified by 'password' with grant option;

刷新

flush privileges;