[FATAL] DB Error: connect failed

I’m pretty sure that nothing in this thread will work for that problem - the original problem was over seven years ago.

You need to (if you haven’t already) start your own thread with FreePBX Version, whether it is a Distro install or not, and what you’re trying to do.