Restore asterisk mysql db from backup

My mysql database was corrupted and I recover it, so it’s now working.
But my files are lost and so I need to restore it from my FreePBX backup.
The problem is that I cannot use web ui nor cli to restore because I’m getting error:

fwconsole

Exception: SQLSTATE[28000] [1045] Access denied for user ‘freepbxuser’@‘localhost’ (using password: YES)::SQLSTATE[28000] [1045] Access denied for user ‘freepbxuser’@‘localhost’ (usi
ng password: YES) in file /var/www/html/admin/libraries/utility.functions.php on line 120
Stack trace:
 1. Exception->() /var/www/html/admin/libraries/utility.functions.php:120
 2. die_freepbx() /var/www/html/admin/libraries/BMO/Database.class.php:149
 3. PDOException->() /var/www/html/admin/libraries/BMO/Database.class.php:144
 4. PDO->__construct() /var/www/html/admin/libraries/BMO/Database.class.php:144
 5. FreePBX\Database->__construct() /var/www/html/admin/libraries/BMO/FreePBX.class.php:71
 6. FreePBX->__construct() /var/www/html/admin/bootstrap.php:144
 7. require_once() /etc/freepbx.conf:9
 8. include_once() /var/lib/asterisk/bin/fwconsole:12

If the database has been restored back to the way it was, then you probably only need the file /etc/freepbx.conf updated with your new mysql access details.

The other way to look at that is that the password stored in /etc/freepbx.conf needs to match your freepbxuser password in your mysql.user table in mysql. If you recovered the tables and didn’t recover the data from this table, your freepbxuser isn’t going to have access to the server tables for Asterisk.

The database wasn’t restored. This is what I need.

Sorry for the late answer, I live in Athens and we experience many problems with AC power due to extended fires that our firefighters cannot extinguish.

I have many backup files but I cannot execute restore to fix the problem

  # fwconsole backup --restore <file...tar.gz>

returns error

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.