多くの場合、次のエラーが発生します。これは、MySQLリソースモニタ機能によるもので、「max__questions」は「1時間以内に実行できるクエリの数」を意味します。

リンク://mysql/mysql-error-exceeded-max

questions-resource-current-value-1000[MySQLエラー – ‘max

questions’リソース(現在の値:1000)を超えました]

ここでは、MySQLで ‘max__questions’の値を更新または変更する方法を説明します。

1)MySQLコンソールにログインします。私はrootです〜

mkyong@myserver:~# mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1640
Server version: 5.0.32-Debian__7etch10-log Debian etch distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>

2)mysqlデータベースに切り替えます。

mysql> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql>

3)MySQLユーザのテーブルからユーザ情報を取得します。

mysql> select user, max__questions from user;
+------------------+---------------+
| user             | max__questions |
+------------------+---------------+
| root             |             0 |
| root             |             0 |
| debian-sys-maint |             0 |
| root             |             0 |
| mkyong           |             1000 |
+------------------+---------------+
5 rows in set (0.00 sec)

mysql>

3)max__questionの値を更新します。0は無制限を意味します。

mysql> update user set max__questions = 0 where user = 'mkyong';
Query OK, 0 rows affected (0.00 sec)
Rows matched: 1  Changed: 0  Warnings: 0

mysql>

4)特権をフラッシュして、変更を有効にします。

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql>

{空} 5)完了。ユーザーのmkyongには、データベースへの無制限のアクセスがあります。

🙂