2013年5月24日 星期五

【MYSQL】exceeded the 'max_questions' resource


當出現User 'user' has exceeded the 'max_questions'
resource (current value: 1000)
時,表示這個使用者的查詢次數超過資料庫中設定的上限(此例為1000筆),這項限制似乎只有在一次做這麼大量處理的時候會受限,例如用BCB中的BatchMove一次搬超過1000筆資料就會跳出這個錯誤,解決的方法是修改該使用者的max_questions這項參數,方法有二,一是用Navicat這類的工具,用root登入,打開MySQL這個database,打開user這個table,把需要修改的user的max_questions加大或乾脆改成0,第二個方法是用root登入MySQL的console模式下指令,指令如下:
mysql> use mysql (切換到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> select user, max_questions from user; (看看各user的max_questions)
+------------------+---------------+
| user             | max_questions |
+------------------+---------------+
| root             |             0 |
| root             |             0 |
| debian-sys-maint |             0 |
| root             |             0 |
| user             |             1000 |
+------------------+---------------+
5 rows in set (0.00 sec)

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


mysql> flush privileges; (讓修改立即生效)
Query OK, 0 rows affected (0.00 sec)

沒有留言:

張貼留言