Blog

Latest Technical Notes

cdr_mysql.c:203 mysql_log: Cannot connect to database server localhost: (1045) Access denied for user ‘freepbxuser’@’localhost’ (using password: YES)

When restoring FreePBX from backup, you may find the CDR database is not updated. This is because the cdr_mysql.conf file is not overwritten by the restore, and so the password for the CDR database is incorrect.

You can resolve it like this:

SSH onto the server
nano /etc/freepbx.conf
Find the lines:
$amp_conf['AMPDBUSER']  = 'freepbxuser';
$amp_conf['AMPDBPASS']  = '3098SADFSLa';​​

Copy the password, quit nano
nano /etc/asterisk/cdr_mysql.conf
Insert the password in the apropriate section
Save the file, quit nano​
amportal reload
You may need to restart the server to allow the password to be updated.

Damiancdr_mysql.c:203 mysql_log: Cannot connect to database server localhost: (1045) Access denied for user ‘freepbxuser’@’localhost’ (using password: YES)
Share this post

1 comment

Join the conversation
  • Darith - September 21, 2016 reply

    Dear All,
    We got the error as below:
    [FATAL] SQLSTATE[28000] [1045] Access denied for user ‘freepbxuser’@’localhost’ (using password: YES)
    SQLSTATE[28000] [1045] Access denied for user ‘freepbxuser’@’localhost’ (using password: YES)

    Many thanks for any assist from you all.

    Regards,

    Darith

Join the conversation

Related Posts