Cannot connect to database

Hi all.

Yesterday, and without touch anything, CDR just stop working. Before that, it was working perfectly.

Why?

I have checked the Asterisk log, and I saw this:

[May 13 09:59:52] ERROR[10761] cdr_addon_mysql.c: cdr_mysql: cannot connect to database server localhost.
[May 13 09:59:52] ERROR[10761] cdr_addon_mysql.c: cdr_mysql: cannot connect to database server localhost.

What thats mean?

Thanks in advance.

It’s pretty clear “cannot connect to database server”. So MySQL is not allowing connections.

There is one common way this happens and one uncommon way.

The common way is that you/somebody did touch something and changed either the username/password or access list controls so it can’t connect any more. the uncommon reason is that MySQL crashed.

type ps -fg mysql and if you see it listed then it’s the common reason, if not then it’s the uncommon reason.