Cant connect to database

I am new to asterisk freepbx. I also have some knowledge of linux so here goes

I installed Fedora Core and installed asterisk 1.8 I am following a guide on

Everything went ok until i ran this command
./install_amp --username=asteriskuser --password=SOMEPASSWORD

everything says OK except connecting to database …Failed
[Fatal} Cannot connect to database

can someone tell me how to delete the db and recreate it or is there an easy fix for this .

When it says ‘SOMEPASSWORD’ it means that you should provide a password of your own (without the single quote characters). Now you have provided a password that contains the single quote character


That wont work. As for how to delete and re-create the database, Google is your friend.

But, since you have limited knowledge of Linux I can see other parts that could fail, I suggest that you download our Distro instead.
You will find it here:

how i fix it???

Checking for PEAR DB…OK
Checking for PEAR Console::Getopt…OK
Using username: asteriskuser
Using password: ******
Checking user…OK
Checking if Asterisk is running…running with PID: 23850…OK
Checking for /etc/amportal.conf…OK
Reading /etc/amportal.conf…OK
Checking for /etc/asterisk/asterisk.conf…OK
Reading /etc/asterisk/asterisk.conf…OK
Using asterisk as PBX Engine
Checking for Asterisk version…
Checking for selinux…OK
Connecting to database…FAILED
Try running ./install_amp --username=user --password=pass (using your own user and pass)
[FATAL] Cannot connect to database