第一步:在大数据库下授grant权限给子数据库
步骤:
#使用管理员root用户授权,库名为子数据库名,账号为管理员账号
grant all privileges on 库名.* to '账号'@'%' with grant option;
第二步:创建子用户及密码
#添加加密方式的用户
#create user '子账号'@'%' identified with mysql_native_password by '密码';
#赋权
#grant all privileges on 子数据库库名.* to '子账号'@'%' with grant option;
#更新配置
#flush privileges;