SUGGESTIONS How to repair PBX after power failure ?

Joined
Feb 13, 2011
Messages
330
Reaction score
12
Hi I got this message after a power failure today :

FATAL ERROR
FreePBX is Unable to Continue

SQLSTATE[HY000]: General error: 144 Table './asterisk/kvstore' is marked as crashed and last (automatic?) repair failed
Trace Back

/var/www/html/admin/libraries/BMO/DB_Helper.class.php:62 PDO->query()
[0]: SELECT * FROM `kvstore` LIMIT 1

/var/www/html/admin/libraries/BMO/DB_Helper.class.php:132 DB_Helper::checkDatabase()

/var/www/html/admin/libraries/BMO/Hooks.class.php:24 DB_Helper->getConfig()
[0]: hooks

/var/www/html/admin/libraries/BMO/GuiHooks.class.php:206 Hooks->getAllHooks()

/var/www/html/admin/config.php:312 GuiHooks->doConfigPageInits()
[0]: noauth
[1]:


Any ideas ?

I tried to repair it with:
mysqlcheck --repair --all-databases

but i got this message:
mysqlcheck: Got error: 1045: Access denied for user 'root'@'localhost' (using password: NO) when trying to connect

Thanks in advance
 

dziny

Guru
Joined
Sep 4, 2014
Messages
45
Reaction score
19
You have to supply the mysql password (I assume you know it).
mysqlcheck -p --repair --all-databases.
 
Joined
Feb 13, 2011
Messages
330
Reaction score
12
Hi diziny thanks for the advice , I did supply the password and now I have the following error any ideas ?

info : Found block with too small length at 397396; Skipped
info : Found block that points outside data file at 397432
info : Found block with too small length at 815144; Skipped
error : Not enough memory for blob at 817768 (need 1937269857)
info : Found block with too small length at 397396; Skipped
info : Found block that points outside data file at 397432
info : Found block with too small length at 815144; Skipped
error : Not enough memory for blob at 817768 (need 1937269857)

status : Operation failed
 

Dave Gray

Guru
Joined
May 22, 2013
Messages
150
Reaction score
60
How's your backups?
When a table is this screwed up, you're not going to fix it. You might try running an fsck on the underlying disk (google is your friend here, I'm sorry that I don't have the time to teach Linux administration.) How many tables are bad? Which exact tables? You might be able to drop and re-create them but you'll still lose the data (which, may or may not be a big deal, depending.)

(My day job is as a DBA, I do MySQL, PostgreSQL, Sybase, SQL Server, etc.)
 

jweldon49

New Member
Joined
Dec 13, 2013
Messages
11
Reaction score
1
Hey there Grillo. Can you remember what the command string was for fsck to fix your issue? I am getting the same thing.
 

Members online

Forum statistics

Threads
25,816
Messages
167,793
Members
19,246
Latest member
OctavianBebu
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top