User 'root' has exceeded the 'max_questions' resource

19,845

Solution 1

Change root user properties, e.g. -

GRANT USAGE ON *.* TO 'root'@<'host_name'> WITH MAX_QUERIES_PER_HOUR 100

Set 0 to reset limitation.

Solution 2

Easy way to fix:

User 'root' has exceeded the 'max_questions' resource (current value: 100)

To Fix issue you have to wait 1 hour before you run any of these commands..because the problem is, the max questions are set to a certain number of request per HOUR. If you try to run these commands before the 1 hour is up, these commands will NOT work. So wait 1 Hour..

after that 1 hour has already passed then run the following in the terminal in exact order:

* mysql -u root -p

* use mysql

* select user, max_questions from user; 

* update user set max_questions = 0 where user = 'root';

* flush privileges;

* select user, max_questions from user; 

(If root max questions says '0' then you've fixed it..Now you're done)

Share:
19,845
Zim3r
Author by

Zim3r

A bad member of community.

Updated on June 04, 2022

Comments

  • Zim3r
    Zim3r about 2 years

    I receive this error:

    ERROR 1226 (42000): User 'root' has exceeded the 'max_questions' resource (current value: 4)
    

    I can't even change the value in database because of this error. any ideas?

  • Zim3r
    Zim3r over 11 years
    Thank you but I still receive this error after executing the command you mentioned: ERROR 1226 (42000): User 'root' has exceeded the 'max_questions' resource (current value: 4)
  • Devart
    Devart over 11 years
    You must reconnect. Then check applied changes, run SHOW GRANTS.
  • Zim3r
    Zim3r over 11 years
    Thanks you so much Devart. Works like a charm.
  • Anuj TBE
    Anuj TBE about 8 years
    where to change properties. I'm on a shared server and stuck to same error
  • Yajana N Rao
    Yajana N Rao almost 6 years
    Getting this error after executing your command Error Code: 1064. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MAX_QUERIES_PER_HOUR 100' at line 1