Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


MySQL table doesn't exist... What are my options?
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

MySQL table doesn't exist... What are my options?

jeromezajeromeza Member
edited May 2015 in Help

Hi,

I've got a WP DB where I keep being told that table's don't exist.

What are my options in terms of recovery here. Can I use files from /var/lib/mysql/ to recover or am I screwed? I've made a case for automysqlbackup and installed that going forward...

I can:

use database;
show tables;
check table wp_users;

Then I see:

Table 'database.wp_users' doesn't exist.

I also did a DB check via mysqlcheck

mysqlcheck -p database

database.wp_commentmeta
Error    : Table 'database.wp_commentmeta' doesn't exist
status   : Operation failed
database.wp_comments
Error    : Table 'database.wp_comments' doesn't exist
status   : Operation failed
database.wp_links
Error    : Table 'database.wp_links' doesn't exist
status   : Operation failed
database.wp_options
Error    : Table 'database.wp_options' doesn't exist
status   : Operation failed
database.wp_postmeta
Error    : Table 'database.wp_postmeta' doesn't exist
status   : Operation failed
database.wp_posts
Error    : Table 'database.wp_posts' doesn't exist
status   : Operation failed
database.wp_term_relationships
Error    : Table 'database.wp_term_relationships' doesn't exist
status   : Operation failed
database.wp_term_taxonomy
Error    : Table 'database.wp_term_taxonomy' doesn't exist
status   : Operation failed
database.wp_terms
Error    : Table 'database.wp_terms' doesn't exist
status   : Operation failed
database.wp_usermeta
Error    : Table 'database.wp_usermeta' doesn't exist
status   : Operation failed
database.wp_users
Error    : Table 'database.wp_users' doesn't exist
status   : Operation failed

Comments

  • jeromezajeromeza Member
    edited May 2015

    .

  • Restore from backup :-\

    Thanked by 1Lm85H4gFkh3wk3
  • tdaletdale Member

    @jeromeza

    The files in /var/lib/mysql are what you are querying inside mysql, so that will not help you unfortunately.

    If it was just a users table i would say delete the table and import it but it seems you are missing a lot of important tables.

    Your best bet here is to restore from a backup. Hopefully you have one. If this is a VPS maybe your provider has at least weekly backups for you. If not you are pretty SOL at this point.

    Sorry for the bad news.

Sign In or Register to comment.