mysql 创建用户付权限

连接数据库
mysql -u root -p 回车    root为用户名

show databases;
use iot_yhgj

查看当前数据库
status




创建用户
create user 'yhgj'@'%' identified by 'qh123456&*9';

授权
grant select on  iot_yhgj.last_tagdata to 'yhgj'@'%';
flush privileges;//刷新系统权限表

收回权限
revoke all privileges  on qeemdb.* from 'qeem'@'%';

猜你喜欢

转载自zqs520.iteye.com/blog/2344703