ERROR 1044 (42000): Access denied for user 'freepbxuser'@'localhost' to database 'cdr'

I restored a backup of a FreePBX 2.9 distro system on a new server that had a fresh install of FreePBX 2.9 distro. I am not seeing any new records in the CRD. I get this error when I log into mysql with the password in the amportal.conf file and try to use asteriskcdr

ERROR 1044 (42000): Access denied for user ‘freepbxuser’@‘localhost’ to database ‘cdr’

I am not seeing how to grant this access. Can anyone please help me out.

Boy do I feel dumb. The database id asteriskcdrdb. but I am still not getting any call detail records logged.

the asterisk db username and password for Freepbx to access the DB is stored in /etc/freepbx.conf make sure that username and password is what the /etc/asterisk/mysql_cdr.conf has.

Thanks Tony

Here are the passwords (not the real ones) I can find and the files they are configured in. Do I need to change the password on cdr_mysql.conf to match the password in freepbx.conf?

When I run “cdr mysql status” it shows not connected.

freepbx.conf

$amp_conf[‘AMPDBPASS’] = ‘AVTxxxxxxxxxx’;

cdr_mysql.conf

password=7Ggxxxxxxxxxx

extensions_additional.conf

AMPDBPASS = AVTxxxxxxxxxx

I changed the password in cdr_musql.conf to match the password in freepbx.conf.

Is there any other way to make these changes affective other than stopping and starting FreePBX? I did a “core restart when convenient” over an hour ago and the system still has not reloaded because it is so busy.

Just reload the cdrmysql module from Asterisk CLI with the module reload command.

There is very little you have to restart for.

SIP, DAHDI, dialplan can all be done without dropping calls. Even g.729 CODEC.

That did the trick. Thanks skyking.