• 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)
    
  • 相关阅读:
    4个小时实现一个HTML5音乐播放器
    一款好看+极简到不行的HTML5音乐播放器-skPlayer
    操纵浏览器的历史记录
    基于jQuery查找dom的多种方式性能问题
    你真的了解console吗?
    关于overflow:hidden和bfc
    jQuery插件开发
    深入浅出jsonp
    jQuery.extend 函数详解
    [转] Hibernate一级缓存、二级缓存
  • 原文地址:https://www.cnblogs.com/huameixiao/p/14701480.html
Copyright © 2020-2023  润新知