How to change the default FreePBX MYSQL password

How to change the default FreePBX Asterisk MySQL database password:

from the ssh shell:
mysqladmin -u asteriskuser -p password newpass

You can find the current database username and password in:
/etc/amportal.conf

Now verify that the new password works:
mysql -u asteriskuser -p

Once you change the password using mysqladmin, you will need to modify
/etc/amportal.conf
to also use the new password. 

We suggest making a copy of:
/etc/amportal.conf
before you edit it.

Simply type:
cp /etc/amportal.conf /etc/amportal.conf.bak
at the shell prompt to copy the current amportal.conf file into a new file called amportal.conf.bak

Inside /etc/amportal.conf you will want to check these two lines:

AMPDBUSER=asteriskuser
AMPDBPASS=newpass

Make sure that they both match the username and password (new password) you set above.

There are two more files you should modify in the same way:
/etc/asterisk/cdr_mysql.conf:

check these two lines:

password=newpass
user=asteriskuser

And:

/etc/asterisk/res_mysql.conf:

Check these two lines:
dbuser = asteriskuser
dbpass = newpass

  • 207 Users Found This Useful
Was this answer helpful?

Related Articles

VicidialNow Specific Information

You must be logged in to read this article. This information is specific to Vicidial Now. When...

Elastix Specific Information

You must be logged in to read this article.  This information is specific to Elastix. When...

DID (Phone Number) Providers we recommend

We recommend ourselves of course :-) http://www.synapseglobal.com/getrates.html

I lost my FreePBX password, how do I reset it?

here is how to change your lost password: 1. SSH to your VPS 2. run mysql on your asterisk box....