kooyee ‘s blog

          開(kāi)源軟件, 眾人努力的結(jié)晶, 全人類的共同財(cái)富
          posts - 103, comments - 55, trackbacks - 0, articles - 66
             :: 首頁(yè) :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理

          [MySQL] Remove privileges from account

          Posted on 2007-11-10 22:04 kooyee 閱讀(429) 評(píng)論(0)  編輯  收藏

          12.5.1.5. REVOKE Syntax

          REVOKE priv_type [(column_list)] [, priv_type [(column_list)]] ...
          ON [object_type] {tbl_name | * | *.* | db_name.*}
          FROM user [, user] ...
          REVOKE ALL PRIVILEGES, GRANT OPTION FROM user [, user] ...
          

          The REVOKE statement enables system administrators to revoke privileges from MySQL accounts. To use REVOKE, you must have the GRANT OPTION privilege, and you must have the privileges that you are revoking.

          Each account is named using the same format as for the GRANT statement; for example, 'jeffrey'@'localhost'. If you specify only the username part of the account name, a hostname part of '%' is used. For additional information about specifying account names, see Section 12.5.1.3, “GRANT Syntax”.

          For details on the levels at which privileges exist, the allowable priv_type values, and the syntax for specifying users and passwords, see Section 12.5.1.3, “GRANT Syntax”

          If the grant tables hold privilege rows that contain mixed-case database or table names and the lower_case_table_names system variable is set to a non-zero value, REVOKE cannot be used to revoke these privileges. It will be necessary to manipulate the grant tables directly. (GRANT will not create such rows when lower_case_table_names is set, but such rows might have been created prior to setting the variable.)

          To revoke all privileges, use the following syntax, which drops all global, database-, table-, and column-level privileges for the named user or users:

          REVOKE ALL PRIVILEGES, GRANT OPTION FROM user [, user] ...
          

          To use this REVOKE syntax, you must have the global CREATE USER privilege or the UPDATE privilege for the mysql database.

          REVOKE removes privileges, but does not drop user table entries. You must do that explicitly using DELETE or DROP USER (see Section 12.5.1.2, “DROP USER Syntax”).


          只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。


          網(wǎng)站導(dǎo)航:
           
          主站蜘蛛池模板: 鹿邑县| 博爱县| 金坛市| 沛县| 米脂县| 尚志市| 贡觉县| 饶平县| 达日县| 永安市| 新密市| 拜泉县| 汉源县| 沅陵县| 射洪县| 合水县| 曲沃县| 合肥市| 建平县| 来宾市| 中西区| 民和| 秦安县| 定襄县| 金山区| 盐山县| 郁南县| 开化县| 谢通门县| 潜江市| 甘肃省| 芒康县| 峨眉山市| 永安市| 策勒县| 淮南市| 洛浦县| 淅川县| 同仁县| 武宁县| 尼玛县|