创建用户、授权用户
create user 'deploy' @'%' identified by '123456' 创建用户
grant select,insert,update,delete on * to deploy 授权用户
flush privileges 立即生效
命令格式
mysql> grant 权限列表 on 库名 to 用户名@“客户端地址”
identified by “密码” //授权用户密码
with grant option; //有授权权限,可选项
grant all on *.* to admin@"%" identified by "123456" with grant option;
远程登录设置
允许test 用户在其它主机登录
use mysql;
update user set host='%' where user='test'