create user test@'%' identified by 'test' //创建用户和密码
grant all on *.* to test@'localhost' identified by 'test'; //赋权限给localhost
grant all on *.* to test@'%' identified by 'test'; //赋权限给所有用户
create user test1@'%' identified by 'test'
grant select,insert,update,delete,create,drop on mysql.test to test1@'%' identified by 'test';
grant select,insert,update,delete,create,drop on mysql.test to test1@'localhost' identified by 'test'; //给本地用户赋予select,insert,update,delete,create,drop在mysql.test表
grant all on *.* to test@'localhost' identified by 'test'; //赋权限给localhost
grant all on *.* to test@'%' identified by 'test'; //赋权限给所有用户
create user test1@'%' identified by 'test'
grant select,insert,update,delete,create,drop on mysql.test to test1@'%' identified by 'test';
grant select,insert,update,delete,create,drop on mysql.test to test1@'localhost' identified by 'test'; //给本地用户赋予select,insert,update,delete,create,drop在mysql.test表