DB not reloading?

I have a newly installed FreePBX Distro (ver 5.211.65) deployment and every time the server loses power and isn’t shut down gracefully (I realize this shouldn’t happen, but it does) the DB never seems to come back on restart. I get the following error when trying to log into the GUI:

FATAL ERROR

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

I am way out of practice with Linux, Asterisk, etc and was at a moderate skill level to begin with, so as I look online for support, I am able to get certain things working and then run into more roadblocks - permissions denied, etc.

Is it normal that I would so consistently have this issue? I’ve tried re-installing and then as soon as I pull power, the same thing happens. I’m now doing it on purpose because reality is that in real life, this could lose power and I rather resolve the issue now, before the system is in full deployment.

I’ve already searched the forums and there are threads that address pieces of this, but following those steps doesn’t fix this specific issue.

Am I messing something up during install? Thoughts?

Any direction is greatly appreciated!

This is a issue with how MySQL init scripts are done in Centos 6.4 or newer.

We have come up with a graceful way to handle this. The next release will include this new package but as long as your are on the FreePBX Distro 5.211.65 you can

yum install mysql-init-fixer

This will solve the issue moving forward.

hi
thanks toniclewis!

i used the command “yum install mysql-init-fixer” and i disconnect from power the server, but not work, same problem, same error ouput when i try to connect to the server’s web, and nothings work until i connect via shh and put these commands:
mv /var/lib/mysql/mysql.sock /var/lib/mysql/mysql.sock.bak
service mysqld start

the second thing that i try “yum update” and i disconnect the power 3 or 4 times and allways work fine.

i run freepbx on esxi and now works fine at 100% (i think :slight_smile: )

thanks for all

p.d: sorry for my english, i’m spanish and my english is very bad…

Seems to have worked! Thanks so much for the response and the support. This is what makes FreePBX such a great product.

Also created the bak file, per your recommendation, Jamiroo. Thanks for the input and don’t be so hard on yourself, your English is actually really good.

Best,

F