Bug #51968 max_user_connections not limiting users
Submitted: 11 Mar 2010 20:19 Modified: 11 Mar 2010 20:39
Reporter: Rolf Martin-Hoster Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Security: Privileges Severity:S2 (Serious)
Version:5.1.42 OS:Linux
Assigned to: CPU Architecture:Any
Tags: max_user_connections not limiting users

[11 Mar 2010 20:19] Rolf Martin-Hoster
Description:
We have been using max_user_connections to allow 1 user from one of two different servers to connect as a poor mans heartbeat for some time (months). Today out of nowhere it is broken.

mysql> select host,user,max_user_connections, max_connections from user where user='klaxon';
+-------------------------+--------+----------------------+-----------------+
| host                    | user   | max_user_connections | max_connections |
+-------------------------+--------+----------------------+-----------------+
| nat___.national-net.com | klaxon |                    1 |               0 |
+-------------------------+--------+----------------------+-----------------+
 
 
| 10000345 | klaxon         | nat567.national-net.com:53591 | NMS      | Query          |       6 | Sending data
      | SELECT alert.alertID, alert.rID, alert.name, alert.vocalize, alert.escalationID, alert.level, alert. |
|  9997312 | klaxon         | nat346.national-net.com:58739 | NMS      | Query          |       1 | Writing to net
      | SELECT resource.parent, alert.alertID FROM resource LEFT JOIN alert ON alert.rID = resource.parent A |

How to repeat:
unknown.

Suggested fix:
unknown.
[11 Mar 2010 20:20] Rolf Martin-Hoster
PS- I did accidentally add some privileges with the full host instead of nat___.national-net.com. I had removed those new users and flush privileges but it doesn't seem to be taking effect. I will restart the mysql server tonight and see if that fixes it.
[11 Mar 2010 20:22] Rolf Martin-Hoster
I should also add that the adding of the permissions for those users was 3-4 days ago. Odd that it should suddenly happen now.
[11 Mar 2010 20:27] Rolf Martin-Hoster
I've tried flush hosts and flush privileges without luck.
[11 Mar 2010 20:29] Rolf Martin-Hoster
FLUSH USER_RESOURCES has also not helped
[11 Mar 2010 20:39] Rolf Martin-Hoster
Ah. Server was under extreme load and I believe the flush commands were not taking effect. Everything is back to normal.