
复制# 普通用户只能看到当前用户发起的看及链接             mysql> selectuser();             +--------------------+            | user()             |             +--------------------+            | testuser@localhost |             +--------------------+            1 row inset (0.00 sec)             mysql> show grants;             +----------------------------------------------------------------------+            | Grants for testuser@%                                                |             +----------------------------------------------------------------------+            | GRANT USAGE ON *.* TOtestuser@%                                 |             | GRANTSELECT, INSERT, UPDATE, DELETEON `testdb`.* TOtestuser@% |             +----------------------------------------------------------------------+            2 rowsinset (0.00 sec)             mysql> show processlist;             +--------+----------+-----------+--------+---------+------+----------+------------------+            | Id     | User     | Host      | db     | Command | Time | State    | Info             |             +--------+----------+-----------+--------+---------+------+----------+------------------+            | 769386 | testuser | localhost | NULL   | Sleep   |  201 |          | NULL             |             | 769390 | testuser | localhost | testdb | Query   |    0 | starting | show processlist |             +--------+----------+-----------+--------+---------+------+----------+------------------+            2 rowsinset (0.00 sec)             mysql> select * from information_schema.processlist;             +--------+----------+-----------+--------+---------+------+-----------+----------------------------------------------+            | ID     | USER     | HOST      | DB     | COMMAND | TIME | STATE     | INFO                                         |             +--------+----------+-----------+--------+---------+------+-----------+----------------------------------------------+            | 769386 | testuser | localhost | NULL   | Sleep   |  210 |           | NULL                                         |             | 769390 | testuser | localhost | testdb | Query   |    0 | executing | select * from information_schema.processlist |             +--------+----------+-----------+--------+---------+------+-----------+----------------------------------------------+            2 rowsinset (0.00 sec)             # 授予了PROCESS权限后,
源码库可以看到所有用户的
免费信息发布网杀掉
链接             mysql> grant process on *.* totestuser@%;             Query OK, 0 rows affected (0.01 sec)             mysql> flush privileges;             Query OK, 0 rows affected (0.00 sec)             mysql> show grants;             +----------------------------------------------------------------------+            | Grants for testuser@%                                                |             +----------------------------------------------------------------------+            | GRANT PROCESS ON *.* TOtestuser@%                               |             | GRANTSELECT, INSERT, UPDATE, DELETEON `testdb`.* TOtestuser@% |             +----------------------------------------------------------------------+            2 rowsinset (0.00 sec)             mysql> show processlist;             +--------+----------+--------------------+--------+---------+------+----------+------------------+            | Id     | User     | Host               | db     | Command | Time | State    | Info             |             +--------+----------+--------------------+--------+---------+------+----------+------------------+            | 769347 | root     | localhost          | testdb | Sleep   |   53 |          | NULL             |             | 769357 | root     | 192.168.85.0:61709 | NULL   | Sleep   |  521 |          | NULL             |             | 769386 | testuser | localhost          | NULL   | Sleep   |  406 |          | NULL             |             | 769473 | testuser | localhost          | testdb | Query   |    0 | starting | show processlist |             +--------+----------+--------------------+--------+---------+------+----------+------------------+            4 rowsinset (0.00 sec)             1.2.3.4.5.6.7.8.9.10.11.12.13.14.15.16.17.18.19.20.21.22.23.24.25.26.27.28.29.30.31.32.33.34.35.36.37.38.39.40.41.42.43.44.45.46.47.48.49.50.51.52.53.54.55.56.57.58.59.60.61.62.
WordPress模板