mysql>GRANT SELECT,INSERT,UPDATE,DELETE ON [db_name].* TO [username]@'[ip]' identified by '[password]' WITH GRANT OPTION;
[username]:远程登入的使用者代码
[db_name]:表示欲开放给使用者的数据库称
[password]:远程登入的使用者密码
ep:
mysql> grant all privileges on xxx.* to 'usernsme'@'localhost' identified by 'xxxxxx';
mysql> flush privileges;
eq
grant all privileges on *.* to '用户名'@'%' identified by '密码';