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:
nano /etc/freepbx.conf
$amp_conf['AMPDBUSER'] = 'freepbxuser'; $amp_conf['AMPDBPASS'] = '3098SADFSLa';
nano /etc/asterisk/cdr_mysql.conf
amportal reload