select user,host from mysql.user;
show grants for root@'localhost';
用户名为:testuser 密码为:123456
create user 'testuser' identified by '123456';
grant create,update,select on test.order to testuser@'%' identified by '123456';
all privileges:所有权限。
select:读取权限。
delete:删除权限。
update:更新权限。
create:创建权限。
drop:删除数据库、数据表权限
REVOKE USAGE ON *.* FROM 'testuser'@'%';
REVOKE ALL PRIVILEGES ON `test`.* FROM 'testuser'@'%';
GRANT EXECUTE ON `test`.* TO 'testuser'@'%';
GRANT EXECUTE ON PROCEDURE `procedure_name` TO 'testuser'@'%'
FLUSH PRIVILEGES;