//创建一个名叫user1,密码pigcms的账号,并赋予给它查询,插入,更新,删除(pigcms.* pigcms库所有表)的权限 grant select,insert,update,delete on pigcms.* to user1@"%" Identified by "pigcms"; flush privileges;
grant 权限 on 库名.表名 to 用户名@"host" Identified by "密码";
host - 指定该用户在哪个主机上可以登陆,如果是本地用户可用localhost, 如果想让该用户可以从任意远程主机登陆,可以使用通配符%