首页 > 数据库技术 > 详细

mysql 常用sql语句

时间:2018-07-14 15:24:38      阅读:121      评论:0      收藏:0      [点我收藏+]
  • 权限
  1. 撤销权限
    revoke all on *.* from ‘root‘@‘192.168.0.197‘ ;

  2. 撤销权限
    revoke all on *.* from ‘xx_db‘ @‘%‘;
  3. 给指定用户赋予指定数据库select的权限

    grant select ON xx_db TO ‘user_xx‘ @‘%‘ IDENTIFIED BY "password";
    给指定用户赋予指定数据库所有的权限
    grant all privileges on xx_db.* to ‘user_xxb‘ @‘%‘ identified by "password";
    给所有用户赋予指定数据库所有权限
    grant select on *.* to ‘xx_db‘ @‘%‘ identified by "password";
    给所有用户赋予所有权限(远程访问,不限制在本机访问)
    grant all privileges on *.* to ‘user_xx‘ @‘%‘ identified by "password";
    赋予grant的权限
    grant all privileges on *.* to ‘user_xx‘ @‘%‘ WITH GRANT OPTION

    给指定用户赋予所有数据库的权限
    grant select on xx_db to ‘user_xx‘ @‘%‘ identified by "password";

     

 

mysql 常用sql语句

原文:https://www.cnblogs.com/xiaoer/p/9309422.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!