MySQL创建用户和授权
-- 语法
create user '用户名'@'主机' identified by '密码';
-- 实例
create user 'rayfoo'@'%' identified by '123456';
-- 刷新,立即生效
flush privileges;
-- 语法
grant all privileges on 数据库.表 to 用户名@'主机' identified by '密码';
-- 实例
grant all privileges on *.* to rayfoo@'%' identified by '123456';
-- 刷新,立即生效
flush privileges;
标签:--,创建,privileges,flush,identified,MySQL,授权,123456
From: https://www.cnblogs.com/zhangruifeng/p/17088289.html