Jump to content

[Solved] Wordpress Mysql Got Erased


incog

Recommended Posts

I know there has been a MySQL crash on Stevie recently, and my site (which is powered by WordPress) went down because WP relies on MySQL. It has been down for 4-5 days now, and I finally decided to try to fix it.

 

I found many threads where people were having the same problem. Here are the answers provided by wolstech and yashrs that seemed to have helped there:

 

 

Well, I did everything that had been suggested in these posts:

  1. Changed my Cpanel password, logged in & out
  2. Tried to browse my website - it spitted a database error
  3. Checked PHPMyAdmin and found all the databases empty
  4. Didn't get discouraged and deleted and recreated the user of my WordPress DB (with the same name, obviously)
  5. Opened WordPress' `config.php` and got the DB password from there, assigned it to the newly created user
  6. Reassigned this user to his DB and granted all the privileges on him
  7. Tried browsing my website again and found that WordPress was working, but only in installation mode

Here's the problem: all my data seems to be lost.

 

Is it really lost or did I do anything wrong following these instructions? What should I do to 'repair' my website?

 

Username: incog

Site: http://brute.tk

Server: Stevie

Link to comment
Share on other sites

It sounds like you got hit by this:

 

http://www.helionet.org/index/topic/23764-stevie-innodb/

The data is likely lost. I lost 3 DBs myself. This is why we always recommend users make regular backups. The strange part is InnoDB data loss seems to be a common problem anywhere you go...another web host I deal with actually had InnoDB break for a chunk of users recently too...had to use a stale backup from December to fix it.

Link to comment
Share on other sites

It sounds like you got hit by this:

 

http://www.helionet.org/index/topic/23764-stevie-innodb/

 

The data is likely lost. I lost 3 DBs myself. This is why we always recommend users make regular backups. The strange part is InnoDB data loss seems to be a common problem anywhere you go...another web host I deal with actually had InnoDB break for a chunk of users recently too...had to use a stale backup from December to fix it.

Thanks for a quick reply!

 

I've read the page you linked to and tried to restore the WP DB with Softaculous. I've got two recent backups, and when I try to restore, it says:

 

Tablespace for table '`incog_wp109`.`wpbw_commentmeta`' exists. Please DISCARD the tablespace before IMPORT.
Google brought me to some questions on StackOverflow about the same problem, but all the answers were suggesting to delete some .idb files from something like /var/lib/mysql, but I don't have access to these directories (http://stackoverflow.com/questions/15694168/error-tablespace-for-table-xxx-exists-please-discard-the-tablespace-before-imp)

 

Doing ALTER TABLE wpbw_commentmeta DISCARD TABLESPACE; from PHPmyAdmin results in an error saying this table doesn't exist (quite true!).

 

As when going to https://brute.tk, I'm shown the installation screen, should I install a fresh version and then roll a backup? Or should I delete the DB completely and try to restore it?

 

EDIT: I installed a fresh version of WP, and the installation succeeded, all the (new) data in wpbw_commentmeta was there, so I decided to roll a backup, but ended up with the same error. Dropping this table didn't help either.

Link to comment
Share on other sites

Did you drop the entire database and recreate it? You cannot reuse the damaged database, even if it appears empty. You must drop it in cPanel, make a new one, then open it in PhpMyAdmin and import the .sql file containing your backup.

 

If it fails after doing that, let me know and I'll escalate it to see if Krydos can discard that for you.

Link to comment
Share on other sites

Did you drop the entire database and recreate it? You cannot reuse the damaged database, even if it appears empty. You must drop it in cPanel, make a new one, then open it in PhpMyAdmin and import the .sql file containing your backup.

 

If it fails after doing that, let me know and I'll escalate it to see if Krydos can discard that for you.

Okay, I dropped the DB from CPanel (and lost its backup, BTW), then tried to recreate it, but it says The database 'incog_wp109' already exists, while PHPmyAdmin doesn't show this DB at all. So, recreating didn't work.

 

Trying to restore it from Softaculous didn't work either: it says that user 'incog_wp109' doesn't have access to the DB 'incog_wp109'. This should mean that this DB still exists?!

 

As a result, the DB is (semi-)dropped, the site certainly shows a DB error (a.k.a. 'error establishing DB connection').

 

Perhaps this can be solved by deletion of the appropriate .idb file I (seem to) have no access to. Please help.

 

EDIT: I found a WP backup with a file called 'softsql.sql' in it and tried to import that file in PHPmyAdmin, but it this failed saying that no DB was selected :(

Link to comment
Share on other sites

You have to use a different database name. Do this:

  1. Create a new database. Use any name you wish as long as it is not the same as the original database.
  2. Go into PHPMyAdmin and select the new database on the left side.
  3. Click Import up top, then import the SQL file.
  4. If it fails, upload the SQL file and PM me a link to it so I can see it. I'll edit it and send you a fixed one.
  5. If it succeeded, go back to cPanel and assign the user incog_wp109 to your new database. Grant it all rights when asked.
  6. Test.
  • Like 1
Link to comment
Share on other sites

 

You have to use a different database name. Do this:

  1. Create a new database. Use any name you wish as long as it is not the same as the original database.
  2. Go into PHPMyAdmin and select the new database on the left side.
  3. Click Import up top, then import the SQL file.
  4. If it fails, upload the SQL file and PM me a link to it so I can see it. I'll edit it and send you a fixed one.
  5. If it succeeded, go back to cPanel and assign the user incog_wp109 to your new database. Grant it all rights when asked.
  6. Test.

 

Yeah, that worked very well! At first I didn't understand that I had to change the DB name in config.php to make WP find it, so didn't reply for some time. Thanks a lot, I really appreciate Heliohost's support, you do a great job there!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...