Unable to set remote db server at install time

Hi all,

I am trying to install freepbx on Ubuntu 14.04 with the mysql database being on another host. The command looks like this: ./install_amp --dbhost=$DB_HOST --installdb --username=asterisk --password=$ASTERISK_DB_PW --freepbxip=$FREEPBXIP --scripted.

When the install begins, I can see in the output that the connection to the db is successful (Connecting to database…OK), but I always end up with (freepbx setting [AMPDBHOST] DOES NOT EXIST, can’t set to [x]) and (Trace Back:

/var/www/html/admin/libraries/BMO/Database.class.php:70 PDO->__construct()
[0]: mysql:host=localhost;dbname=asteriskcdrdb)

Why does it always revert to localhost??

I can connect to the mysql server just fine from command line.

If I install a local mysql server, it works flawlesly.

Am I doing something wrong, or missing a parameter?

Thank you

Bernard