创建数据库:
drop database if exists `xxxx`;
create database `xxxx`
DEFAULT CHARACTER SET utf8mb4
COLLATE utf8mb4_general_ci;
show create database `xxxx` ;
alter database `xxxx` default character set 'utf8';
创建用户
create user michael@'%' identified by '123456';
注:% 指任意的远程终端都可以登录
授权用户
grant all privileges
on databaseName.*
to userName@"localhost"
identified by "123456"
with grant option;
flush privileges;