FATAL ERROR DB Error: connect failed

FATAL ERROR

DB Error: connect failed

Trace Back

/var/www/html/admin/libraries/db_connect.php:71 die_freepbx()
[0]: DB Error: connect failed

/var/www/html/admin/bootstrap.php:91 require_once()
[0]: /var/www/html/admin/libraries/db_connect.php

/etc/freepbx.conf:9 require_once()
[0]: /var/www/html/admin/bootstrap.php

/var/www/html/admin/config.php:99 include_once()
[0]: /etc/freepbx.conf

====================================================
freepbx version :6.12.65-32

So today i was trying to get phone calls events, both incoming and outgoing from mysql, for a ticketing system.
But on the way the default user: freepbxuser and the default password, that i got from amportal.conf didnt work for me.
so i tried to change from CLI mode, try this, try that etc didnt manage to connect from MYSQL workbench.

Later when i tired to access from GUI i received the error. P.S incoming calls and outgoing calls are working.
I can login with my root user and password to CLI mode.

until now i have treid googling and tried to change the password from CLI also change the password in amportal.conf , extensions_additional.conf etc. but without success

when i trie to change the password from CLI with == UPDATE user set Password=PASSWORD(‘newsecretpassword’) WHERE User=’freepbxuser’ ==

im receiving access denied for user ‘’@‘localhost’ (using password yes).

also this file is missing mv /var/lib/mysql/mysql.sock

is there any help :frowning:

That should be /etc/freepbx.conf

You can not connect to MySQL from a remote machine. This is by design.

None of those have anything to do with the MySQL password.

It looks like you’ve been panic-ing and have tried a bunch of things randomly. Relax!

The first thing to try is to just try connecting as root. ‘mysql -uroot asterisk’ and see if you can connect. If it asks you for a password, try the password in /etc/freepbx.conf

If that STILL doesn’t work, you’ll need to reset the MySQL ‘root’ account, which is documented in lots of places (Here’s one: http://dev.mysql.com/doc/refman/5.7/en/resetting-permissions.html ) and then reset the freepbx users password to what it is in /etc/freepbx.conf

Yes, i was trying anything, and later i saw i screw it all cuz even calls wasnt working.
I had a full backup so i did a fresh install and restore.

now im having an error in dashboard

retrieve_conf failed, config not applied
Reload failed because retrieve_conf encountered an error: 1

thanks for replay :smiley:

fix of my second error is here

You can not connect to MySQL from a remote machine. This is by design.

Hi Rob,

is there anything you can help me on this. I want to create a ticketing system along with voip
so where there is a call the ticketing system read the call events and display on pc screen the info of the caller.

how to deal on this

This “voids your warranty”, but if you are going to do this, the processing needs to happen on the server. There are too many things in the database that you don’t want the world to be able to access.

Your other options include running a “replication” for your data to another server.

If you are really desperate to do this, you can set up a new user (with a really good password and very specific host limitations) with select permissions for the tables you need.