CDR not reporting since restore

Recently restored to the latest Disto and my CDR is showing data from the previous install but nothing current. I suspect that MySQL is the problem…see below

cdr mysql status
Not currently connected to a MySQL server

Everything else appears to be working fine. Any suggestions?

Greatly appreciate any help.

When you did the restore the Mysql passwords probably don’t match.

Take a look int /etc/asterisk/cdr_mysql.conf and set the asteriskcdrdb password in mysql to match.

You have to use the mysql command line tool and the grant command. I don’t know the syntax off the top of my head.

I’ve located the file via winscp but not sure on the mysql command process. Is there a link that maybe of some help? Just need a little help on the steps required to change/match the passwords. thanks for all your help.

Don’t ever use WinSCP to edit the files. You need to use one of the built in editors. Nano is the easiest. Get used to the command prompt.

nano /etc/asterisk/cdr_mysql.conf

Commands are in the bar at the bottom.

MySQL is heavily documented. You will also need to be comfortable with Google and looking up syntax.

I found this helpful page: http://www.yolinux.com/TUTORIALS/LinuxTutorialMySQL.html

If I were you I would use the asteriskuser account from FreePBX/AMP and then grant it privileges to use asteriskcdrdb.

I changed the password and now I’ve managed to break FreePBX. Asterisk is running fine. I could use some direction on how to dig myself out of this one. I do have a backup prior to any changes but not sure how to restore or just restore the files to bring FreePBX back.

FATAL ERROR
DB Error: connect failed
Trace Back
/var/www/html/admin/common/db_connect.php:63 die_freepbx()
[0]: DB Error: connect failed

/var/www/html/admin/bootstrap.php:75 require_once()
[0]: /var/www/html/admin/common/db_connect.php

/etc/freepbx.conf:9 require_once()
[0]: /var/www/html/admin/bootstrap.php

/var/www/html/index.php:18 include_once()
[0]: /etc/freepbx.conf

My comment was to use grant permissions not to change the password.

Go look in FreePBX (this is 2.9 right???) advanced settings and find the db password.

Set it back to that password.

Thank you. I found the password in /etc/freepbx.conf and then changed freepbx mysql user account password to the same. I also had to change /etc/asterisk/cdr_mysql.conf to reflect the same user name and password as well.