创建用户前需要
Use mysql;
创建用户
create user 'jack'@'localhost' identified by '123456';
grant all privileges on *.* to 'jack'@'localhost' ;
单独授权
GRANT SELECT ON oilsystem.input TO 'jack'@'localhost';
刷新权限并查看权限
FLUSH PRIVILEGES;
select * from user;
回收权限
REVOKE select ON *.* FROM 'jack'@'localhost';