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

  • 相关阅读:
    Maven2-profile多环境配置
    Maven-setting.xml详解
    Maven-通过命令操作maven项目
    Maven-eclipse运行maven命令
    Eclipse-导入maven项目
    Maven-搭建maven web项目
    Maven-搭建普通maven项目
    Maven-pom.xml详解
    Maven-生命周期
    Maven-常用命令
  • 原文地址:https://www.cnblogs.com/xiaopeng01/p/11125216.html
Copyright © 2011-2022 走看看