How link FreePbx with an external Mysql Server

hello everybody
I need to make Freepbx uses an external mysql server (installed on another machine) for both cdr & all setting

Edit /etc/amportal.conf, change the following settings to match your mysql server:

AMPDBHOST: the host to connect to the database named ‘asterisk’

AMPDBHOST=localhost

AMPDBUSER: the user to connect to the database named ‘asterisk’

AMPDBUSER=asteriskuser

AMPDBPASS: the password for AMPDBUSER

AMPDBPASS=amp109

CDR DB Settings: Only used if you dont use the default values provided by freepbx.

CDRDBHOST: hostname of db server if not the same as AMPDBHOST

CDRDBPORT: Port number for db host

CDRDBUSER: username to connect to db with if its not the same as AMPDBUSER

CDRDBPASS: password for connecting to db if its not the same as AMPDBPASS

CDRDBNAME: name of database used for cdr records

CDRDBTABLENAME: Name of the table in the db where the cdr is stored cdr is default