`//创建用户并设置数据库
GRANT USAGE ON 数据库.* TO '用户名'@'localhost' IDENTIFIED BY '用户密码' WITH GRANT OPTION;
//上面运行后用户权限都为N,运行下面语句 设置权限
GRANT all privileges on 数据库..* TO '用户名'@'localhost' IDENTIFIED BY '用户密码';
FLUSH PRIVILEGES; //刷新`