create user test identified by ‘password’;password 你要创建的用户对应的密码
grant all on database.* to test; database 指要授权的数据库
mysql 创建用户并授权数据库
原文:https://www.cnblogs.com/Hackerman/p/11329878.html