zoukankan      html  css  js  c++  java
  • mysql基础操作(三)

    DCL语句主要是DBA用来管理系统中的对象权限。

    例:

      创建一个数据库user1,具有对test1数据库中所有表的select 、inster权限:

    mysql> grant select,insert on test1.* to 'user1'@'%' identified by 'yan123';
    Query OK, 0 rows affected (0.00 sec)

    mysql> flush privileges;
    Query OK, 0 rows affected (0.00 sec)

    收回insert权限

    mysql> revoke insert on test1.* from 'user1'@'%';
    Query OK, 0 rows affected (0.00 sec)

    mysql> flush privileges;
    Query OK, 0 rows affected (0.01 sec)

    MYSQL帮助使用:

      “? contents”命令来显示所有可供查询的分类。

      例:

    mysql> ? contents;
    You asked for help about help category: "Contents"
    For more information, type 'help <item>', where <item> is one of the following
    categories:
    Account Management
    Administration
    Compound Statements
    Data Definition
    Data Manipulation
    Data Types
    Functions
    Functions and Modifiers for Use with GROUP BY
    Geographic Features
    Help Metadata
    Language Structure
    Plugins
    Procedures
    Storage Engines
    Table Maintenance
    Transactions
    User-Defined Functions
    Utility

     

    mysql> ? show
    Name: 'SHOW'
    Description:
    SHOW has many forms that provide information about databases, tables,
    columns, or status information about the server. This section describes
    those following:

    SHOW AUTHORS
    SHOW {BINARY | MASTER} LOGS
    SHOW BINLOG EVENTS [IN 'log_name'] [FROM pos] [LIMIT [offset,] row_count]
    SHOW CHARACTER SET [like_or_where]
    SHOW COLLATION [like_or_where]
    SHOW [FULL] COLUMNS FROM tbl_name [FROM db_name] [like_or_where]
    SHOW CONTRIBUTORS
    SHOW CREATE DATABASE db_name

  • 相关阅读:
    winform npoi excel 样式设置
    winform NPOI excel 导出并选择保存文件路径
    datagridview 代码添加列
    表单名 name 选择器
    NPOI 设置excel 边框
    winform 版本号比较
    winform app.cpnfig 文件的引用
    blog发布测试
    jQuery选择器
    表格隔行变色
  • 原文地址:https://www.cnblogs.com/xiaopeng01/p/11125216.html
Copyright © 2011-2022 走看看