MySQL添加新用户并设置权限

##SQL语句添加mysql用户
create user 'UserName'@'127.0.0.1' identified by 'PASSWORD';
###配置权限
GRANT ALL privileges ON DataBaseName TO 'UserName'@'127.0.0.1';

FLUSH PRIVILEGES;