Portal Home > Knowledgebase > VOIP > How to change the default FreePBX MYSQL password


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



Was this answer helpful?

Print this Article Print this Article

Also Read