After update from - it say DB Error: connect failed

I have start today update frepbx distro with ssh using instruction from this wiki

So i do update
it ask me rebbot and all was ok
next i do update

Everything was ok it say me pls reboot, i have reboot and when i start open web it say me


DB Error: connect failed

Trace Back

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

/var/www/html/admin/bootstrap.php:98 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:109 include_once()
[0]: /etc/freepbx.conf

Pls help me what i need to do.
i need the web interface

That happens because Mysql is not running.

That happened on a couple of installations I had with an unclean shutdown.

try with
service mysql status

If is not running, try
service mysql start

If it says the socket is used, do this:
rm /var/lib/mysql/mysql.sock
service mysql start

It’s also very likely that asterisk is not running, so follow with
amportal start

Let us know if that sorts it.

If you continue on the updates it will install a new RPM that fixes this MySQL issue.

thank you
you are very help me

Hi Tony,

Seen yesterday on two 5.x installs updated to the latest (.6) - that’s why I got the answer.

If the system suffers an unclean shutdown (e.g. power cut) the “mysql.sock” file lingers behind, and the startup script fails to start mysql on reboot, saying there’s another instance running.

I guess they’re assuming that if there’s that SOCK file mysql is up, and not bothering to really check if there’s an instance running with a “” file or grepping a “ps”.

Package is not ours, but you could patch and repackage on your repo.

Do you fancy to file a bug with the maintainers? I’m not so keen.

We already built our own package that fixes this and included in the -7 release yesterday.

Great, but look around in the forum because somebody that had the stray mysql.sock file problem just upgraded to .7 and the script spewed out errors on him about the DB, again.
Do we have a race condition where mysql doesn’t remove the .sock file when we reboot from a script?
Clutching at straws here (and not upgrading to .7 ATM).

The rpm mysql-init-fixer removes the .sock file on a reboot.

The upgrade is just fine. The fix can only work if MySQL is running. Its not a new MySQL RPM but a wrapper script we wrote