mysql -u root -p
******
show databases;
use test;
create user 'user_for'@'%' identified by 'user_for_pw';
grant select,insert on data to user_for;
登陆
mysql -u user_for -p;
*****
show grants;
结果
GRANT SELECT, INSERT ON `test`.`data` TO 'user_for'@'%'