MySQL reload許可權

shytodear發表於2016-09-20
MySQL reload許可權:
reload 是 administrative 級的許可權,即 server administration;這類許可權包括:
   CREATE USER, PROCESS, RELOAD, REPLICATION CLIENT, REPLICATION SLAVE, SHOW DATABASES, SHUTDOWN, SUPER
這類許可權的授權不是針對某個資料庫的,因此須使用on *.* 來進行:


C:\Users\Igor>mysql -ufiletest -p
Enter password: ******
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 7
Server version: 5.7.11-log MySQL Community Server (GPL)

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.


Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.


mysql> use test;
Database changed
mysql> flush table c;
ERROR 1227 (42000): Access denied; you need (at least one of) the RELOAD privile
ge(s) for this operation

##root登陸授權:
mysql> grant reload on *.* to 'filetest'@'localhost';
Query OK, 0 rows affected (0.06 sec)


##再次flush table成功
C:\Users\Igor>mysql -ufiletest -p
Enter password: ******
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 5.7.11-log MySQL Community Server (GPL)

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> use test;
Database changed
mysql> flush table c;
Query OK, 0 rows affected (0.00 sec)


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/27126919/viewspace-2125204/,如需轉載,請註明出處,否則將追究法律責任。

相關文章