FATAL ERROR DB Error: connect failed

Getting errors when trying to access the http admin interface. Error message is:

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

MySQL is running, but if I stop it, it fails to start again with the following error showing up in ‘journalctl -xn’:

Dec 28 18:06:15 raspbx CRON[10175]: pam_unix(cron:session): session closed for user asterisk
Dec 28 18:06:19 raspbx systemd[1]: Starting LSB: Start and stop the mysql database server daemon…
– Subject: Unit mysql.service has begun with start-up
– Defined-By: systemd
– Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

– Unit mysql.service has begun starting up.
Dec 28 18:06:47 raspbx /etc/init.d/mysql[11217]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debi
Dec 28 18:06:47 raspbx /etc/init.d/mysql[11217]: [61B blob data]
Dec 28 18:06:47 raspbx /etc/init.d/mysql[11217]: error: 'Lost connection to MySQL server at ‘reading authorization packet’,
Dec 28 18:06:47 raspbx /etc/init.d/mysql[11217]:
Dec 28 18:06:47 raspbx mysql[10369]: Starting MySQL database server: mysqld . . . . . . . . . . . . . . . . . failed!
Dec 28 18:06:47 raspbx systemd[1]: mysql.service: control process exited, code=exited status=1
Dec 28 18:06:47 raspbx systemd[1]: Failed to start LSB: Start and stop the mysql database server daemon.
– Subject: Unit mysql.service has failed
– Defined-By: systemd
– Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

– Unit mysql.service has failed.

– The result is failed.

Any ideas on what to check?

It is a fresh installation or working freePBX? If it is a fresh system, when installing mysql, you have to leave it as blank, later step will set password for you.

Running system, been running it on a Raspberry Pi with a handful of phones and a GV trunk for about a year. Did some more poking around and it looks like the MySQL DB got hosed, root cause of that was a bad power supply for the Raspberry Pi.