How do I fix this error?

My server was accidentally rebooted while doing module updates and now this is what I’m left with:

FATAL ERROR

SELECT data FROM module_xml WHERE id = ‘mod_serialized’ [nativecode=1030 ** Got error 134 from storage engine]SQL -
SELECT data FROM module_xml WHERE id = ‘mod_serialized’

Trace Back

/var/www/html/admin/libraries/sql.functions.php:25 die_freepbx()
[0]: SELECT data FROM module_xml WHERE id = ‘mod_serialized’ [nativecode=1030 ** Got error 134 from storage engine]SQL -
SELECT data FROM module_xml WHERE id = ‘mod_serialized’

/var/www/html/admin/libraries/modulelist.class.php:17 sql()
[0]: SELECT data FROM module_xml WHERE id = ‘mod_serialized’
[1]: getOne

/var/www/html/admin/libraries/modulelist.class.php:11 modulelist->modulelist()
[0]: db_mysql: (phptype=mysql, dbsyntax=mysql) [connected]

/var/www/html/admin/libraries/module.functions.php:360 modulelist::create()
[0]: db_mysql: (phptype=mysql, dbsyntax=mysql) [connected]

/var/www/html/admin/libraries/utility.functions.php:1483 module_getinfo()
[0]:
[1]: 2

/var/www/html/admin/libraries/utility.functions.php:1459 _bootstrap_parse_hooks()

/var/www/html/admin/bootstrap.php:159 bootstrap_include_hooks()
[0]: pre_module_load
[1]: all_mods

/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

Is there anything I can do while at console to fix this?

bump

Your mysql tables are corrupt, you will need to repair the database asterisk (if possible)

http://dev.mysql.com/doc/refman/5.1/en/repair-table.html

The pbx system is still working. I’m able to place/receive calls. It appears only the web interface is borked so I can’t use the freepbx web interface.

How would I go about doing this repair?–should I make a php page to execute the sql code? Any advice?

Make a php page to execute SQL code? No idea what that means.

You need to use the mysql tool to try and repair DB. Don’t suppose you have a backup?

I am updating a system tonight, made 4 backups before I started.

I’m not familiar with using the mysql tool. How would I access it?

bash, over ssh would be the simplest way.

When someone gives you an answer that you don’t know what it is go to Google.

If you put in “linux mysql command line database repair” you would be shocked. It’s a miracle, the answer is right before your eyes.

If you Google “fix mysql database” you will be lost. Learning to construct useful searches is imperative if you are trying to self support yourself on complex IT tasks without experience.

And, for the love of God, make a backup of the hosed DB (from said command line not FreePBX) before you start repairing your DB.

2 Likes

For all those that found this thread previously un-informative:

  • Ignore the above poster
  • Log in to your server via SSL or whatever you use to get a Linux command prompt with admin priveledges
  • type: mysqlcheck --repair --use-frm --all-databases

The above worked for me. Hope it works for others.

3 Likes

Running this command without understanding what it does and not backing up your DB is very dangerous.