执行前要确认,授权给这个用户的数据库已经被创建好
create database 库名 character set utf8mb4;
接下来,可以采用直接授权的方式,能够同时创建用户以及授权
grant select,insert,delete,update,create on 库名.* to '用户名'@'%' identified by '密码';
执行前要确认,授权给这个用户的数据库已经被创建好
create database 库名 character set utf8mb4;
接下来,可以采用直接授权的方式,能够同时创建用户以及授权
grant select,insert,delete,update,create on 库名.* to '用户名'@'%' identified by '密码';