1. 授予用户对某个表的某个字段的更改权限:grant UPDATE(distributor_id,distributor_score) on shurenbang.usertogaolifa@% IDENTIFIED BY 'youjiahgaolifs@#'
  2. 授予用户读取的权限:grant select on need.* to dashuju@% IDENTIFIED BY 'daShuJuuu'
  3. 备份数据库 利用mysqldump -u 用户名 -p databasename > 导出名字.sql导出数据库到文件
  4. 撤销权限 使用命令:revoke all privileges on databasename.tablename from 'username'@'host';
  5. 删除用户 delete from mysql.user where User='sksp'
  6. 添加用户:grant all privileges on *.* to quansu@% IDENTIFIED BY 'Quansu@#1314'
  7. 删除用户:DROP USER 'songwei'@'10.31.87.206';
  8. 内网用户权限:GRANT SELECT,UPDATE,DELETE,INSERT ON need.* TO 'need'@'10.31.87.110'
  9. 查看Mysql版本:select version()

– DROP USER ‘songwei’@‘10.31.87.206’;

SELECT * FROM mysql.user_view order by user ;

– CREATE USER ‘need’@‘10.%’ IDENTIFIED BY ‘602.Need’;

– GRANT SELECT,UPDATE,DELETE,INSERT ON need.* TO ‘need’@‘10.%';

– show grants for ‘songwei’@‘10.31.87.206’;

– – GRANT SELECT, INSERT, UPDATE, DELETE ON need.draw_user TO ‘songwei’@‘10.31.87.206’; – GRANT SELECT, INSERT, UPDATE, DELETE ON need.draw_zan TO ‘songwei’@‘10.31.87.206’; – GRANT SELECT, INSERT, UPDATE, DELETE ON need.draw_hongbao TO ‘songwei’@‘10.31.87.206’; – GRANT SELECT ON need.quiz_user TO ‘songwei’@‘10.31.87.206’;