创建用户

create user 用户名 identified by 'password';

创建schema

create schema 数据库名 default character set utf8mb4 collate utf8mb4_general_ci;

授权

grant all on 数据库名.* to '用户名'@'%';

精细授权

grant select,insert,update,delete on *.* to 用户名@'%' Identified by "password";

刷新授权

flush privileges;