I had these errors randomly popup too I'm not sure if you have the same issue but your description sounds similar.

My issue was related to my MySQL server having multiple network interfaces with one configured public and one private and these connection errors were a result of how I set up the mysql user. I had it set up as kamailio@'private.ip' but kamailio was actually attempting connection to the public IP (which was not authorized). If you have multiple network interfaces I would suggest checking kamailio.cfg and the user set up to access mysql and verify your IP's/hostnames and maybe even verify on both boxes what interfaces the connections our going out/coming in on.

Benjamin Fitzgerald
LETS Corporation
(925) 235-1154
ben@letscorp.us




*******Confidential Notice: 
This message is intended only for the use of the individual or entity to which it is addressed and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this message in error, please delete this message from all computers and contact Orion Systems/LETS Corp immediately by return e-mail and/or telephone at (925) 566-5600

On Fri, Oct 16, 2015 at 7:11 AM, John Billings <jandrewb@gmail.com> wrote:
Both boxes are running Debian 8.

I’m still looking at the mysql logs, but I haven’t found anything relevant, yet.


On Oct 14, 2015, at 5:00 AM, sr-users-request@lists.sip-router.org wrote:

Hello,

do you have centos+selinux? Because I heard about a lot of limits with
the combination of the two.

Have you checked the mysqld syslog messages, anything relevant there?

Cheers,
Daniel



_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users