MYSQLユーザーに接続時間、クエーリ数などアクセス制限を付けて作成する。


GRANT select,insert,update,delete on DB001.* to 'restrict_user'
IDENTIFIED BY 'password'
WITH
MAX_CONNECTIONS_PER_HOUR 10
MAX_QUERIES_PER_HOUR 1000
MAX_UPDATES_PER_HOUR 100;

restrict_user


mysql> show grants for 'restrict_user';
--------------------------------------------------------------------------------------+
| Grants for restrict_user@% |
+-------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'restrict_user'@'%' IDENTIFIED BY PASSWORD '*2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19'
WITH MAX_QUERIES_PER_HOUR 1000 MAX_UPDATES_PER_HOUR 100 MAX_CONNECTIONS_PER_HOUR 10 |
| GRANT SELECT, INSERT, UPDATE, DELETE ON `DB001`.* TO 'restrict_user'@'%' |
+-------------------------------------------------------------------------------------+
2 rows in set (0.00 sec)

mysql>

Comments are closed.

Post Navigation