1、创建用户 create user '用户名'@'%' identified by '密码';
create user 'test'@'%' identified by '123';
2、赋予数据库权限 grant all privileges on 数据库名称.* to '用户名'@'%';
grant all privileges on dbname.* to 'test'@'%';