First export and import the database data into the new database. It goes without saying that the RasPBX should be stopped or any changes between the export and import will not be captured and lost. The root password the local database is raspberry
To stop FreePBX:
sudo amportal stop
There are 2 databases to export called asterisk and asteriskcdrdb. The former contains settings and the latter contains the call records.
There is also a asteriskuser account to copy over. The default password is rasp_amp which should be changed but if you’re moving the database, it’s best to leave it as default, get it working and then going back to change it.
The following places needs to be changed. Ideally the password would be different but the host address should be changed to the new server address.
Edit /etc/freepbx.conf and change:
password:
$amp_conf['AMPDBPASS'] = 'rasp_amp';
host:
$amp_conf['AMPDBHOST'] = 'localhost';
Edit /etc/amportal.conf:
password:
AMPDBPASS=rasp_amp
host:
AMPDBHOST=localhost
Edit /etc/asterisk/cdr_mysql.conf:
password:
password = rasp_amp
host:
hostname = localhost
Start FreePBX
sudo amportal start
First check the logs in /var/log/asterisk/full for any signs it cannot connect to the database. Ensure there has been enough times for the extensions / handsets to reconnect to the FreePBX.
Next make a test call (even a call where it was hungup without being picked up) and see if it was looked in the CDR report.
Disable MySQL from starting up:
update-rc.d mysql disable
This will leave the database installed but not running.
Changing and moving the database is fairly quick and easy but finding where all the configuration lies is the hard part.
How to change the default FreePBX MYSQL password
No reports in FreePBX but there are recors in cdr db-table