zoukankan      html  css  js  c++  java
  • mysql常用命令

    mysql> show variables like '%bind_address%';
    +---------------+-------+
    | Variable_name | Value |
    +---------------+-------+
    | bind_address  | *     |
    +---------------+-------+
    mysql> show grants for root@localhost;
    +---------------------------------------------------------------------+
    | Grants for root@localhost                                           |
    +---------------------------------------------------------------------+
    | GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION |
    | GRANT PROXY ON ''@'' TO 'root'@'localhost' WITH GRANT OPTION        |
    +---------------------------------------------------------------------+
    mysql> select user,host from mysql.user;
    +---------------+-----------+
    | user          | host      |
    +---------------+-----------+
    | mysql.session | localhost |
    | mysql.sys     | localhost |
    | root          | localhost |
    +---------------+-----------+
    # 创建用户 并刷新权限
    mysql> create user adq@localhost identified by "cdq";
    Query OK, 0 rows affected (0.00 sec)
    # 所有权限
    mysql> grant all privileges on *.* to adq@localhost;
    Query OK, 0 rows affected (0.00 sec)
    # order库下所有表的select权限
    mysql> grant select on order.* to adq@localhost;
    Query OK, 0 rows affected (0.00 sec)
    # order库下所有表的select权限 并且只能查询id列
    mysql> grant select(id) on order.* to adq@localhost;
    Query OK, 0 rows affected (0.00 sec)
    
    # order库下所有表的select,insert,update,delete权限
    mysql> grant select,insert,update,delete on order.* to adq@localhost;
    Query OK, 0 rows affected (0.00 sec)
    
  • 相关阅读:
    java throws处理
    java 对象的向下转型
    模仿百度三维地图的js数据
    MyEclipse:Address already in use
    Javascript 的addEventListener()及attachEvent()区别分析
    Javascript获得URL参数
    filter : progid:DXImageTransform.Microsoft.AlphaImageLoader
    TortoiseSVN使用简介(来自网络)
    javascript控制鼠标中键滑动
    跨浏览器实现自定义事件处理
  • 原文地址:https://www.cnblogs.com/huameixiao/p/14701480.html
Copyright © 2011-2022 走看看