Forums

mysql database restored but wordpress acting like new instal (11 posts)

  1. ryans1
    Member
    Posted 1 week ago #

    Hi, Ive recently restored a database after accidentally deleting it. However, Wordpress acts like it is a new installation and sets up a blank blog. I restored the database with the *.sql file through my hosting control center, the data base name and password are still the same. All that changed was the host name which I updated in the wp-config.php file and then uploaded.

    It still comes up as a new blog rather than with all my pages, what is happening? Have i forgotten to do something?

    Thanks in advance for your help
    Ryan

  2. Ivovic
    Member
    Posted 1 week ago #

    why would the hostname change after accidentally deleting a database?

    try using 'localhost' as the hostname and make sure you are using the same table prefix in your current wp-config.

    I'd suggest re-uploading the .sql and then using phpMyAdmin which should also be available via your hosting control panel, to actually inspect the database and make sure you can see the tables (and the table prefix) right there.

  3. ryans1
    Member
    Posted 1 week ago #

    Hi thanks Ivovic, gave me something more to look at since i am really lost now, but I still don't see anything wrong. I had created a new database to restore the .sql to, so i had to change the hostname from p41mysql119.secureserver.net to p41mysql31.secureserver.net otherwise i get a database location error with 'localhost'. Now it takes me to a new wordpress blog.

    I went into phpMyAdmin and i can see 10 tables wp_comments, wp_links, wp_options etc. and I can see this code in my current wp-config $table_prefix = 'wp_'; so it looks like it is good?!?

    What else can I do? I spent heaps of time on this website/blog and am really regretting deleting it!

  4. Ivovic
    Member
    Posted 1 week ago #

    ahh I understand your situation a little better now, regarding the hostname issue. GoDaddy has a lot to answer for ;)

    when you browse around with phpMyAdmin, do you actually see your old posts in the database?

    If not, are you sure you're:

    a) restoring the backup correctly... or
    b) that the backup actually has any of your old posts in it?

  5. ryans1
    Member
    Posted 1 week ago #

    This is what I asked my provider... can i actually see my posts... but he just said the database is just code, you cant see your posts... so what would I look for to see if i have any of the old posts restored.

    Also, I don't know if this helps but when i restore the .sql file i get the following message:

    Import has been successfully finished, 8 queries executed.

    SQL query: -- MySQL dump 10.9 -- -- Host: p50mysql83.secureserver.net Database: ryansWHC -- ------------------------------------------------------ -- Server version 5.0.45-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;# MySQL returned an empty result set (i.e. zero rows). /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;# MySQL returned an empty result set (i.e. zero rows). /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;# MySQL returned an empty result set (i.e. zero rows). /*!40101 SET NAMES utf8 */;# MySQL returned an empty result set (i.e. zero rows). /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;# MySQL returned an empty result set (i.e. zero rows). /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;# MySQL returned an empty result set (i.e. zero rows). /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;# MySQL returned an empty result set (i.e. zero rows). /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;# MySQL returned an empty result set (i.e. zero rows).

  6. Ivovic
    Member
    Posted 1 week ago #

    I don't know enough about it to tell you what those lines mean, unfortunately...

    but I can tell you how to see if your posts are in the database, using phpMyAdmin.

    You mentioned earlier, you were able to see 10 tables, so I won't cover getting to that point. From there, click on the wp_posts table on the left navigation bar of phpMyAdmin.

    Along the top now, you should see a "browse" button. If your posts are actually there in the DB, you should be able to see short snippits of them in this view.

    Don't worry if some of them appear blank - those are probably your file/image uploads. Just make sure you can see several of the posts you've written, along with their titles, etc.

    If you can't... then your DB is a fresh wordpress install, not a restored backup.

    Hope that helps a bit.

  7. ryans1
    Member
    Posted 1 week ago #

    Yes it does help, I can see the posts once I click on browse...that was simple... I don't know why my provider could have told me that before.

    Anyway none of my posts are there. Either I'm not restoring properly, which i would be surprised because that seems simple too... Import...locate .sql file and press go. But I'm getting all that strange code so i think I'll call up my provider again and ask them what it means and to walk me through a restore or if the .sql file is actually empty!?!

    Thanks for the help. Now i know what to ask them for.

  8. Ivovic
    Member
    Posted 1 week ago #

    I think that's a good idea. Lets hope the import is just failing, rather than the backup being empty.

    Good luck with that, and let us know how it turns out.

  9. ryans1
    Member
    Posted 1 week ago #

    Thanks for you help man. Had you not shown me how to browse my post tables I would have not know my import was not working.

    Turns out the import was never going to work anyway. Once i contacted them and said "I cant see my post tables and i think the back up is empty" they sent me another .sql file and just by looking at the file-size shows they sent me something wrong in the first place...
    640 KB v's 697 bytes!!!!!

    Go's to show some support people have no idea about diagnosing problems and would rather take the easy road out by saying its not a problem with 'their' side, go to wordpress support instead.

    Thanks HEAPS, my last 3 months of work is not all lost.

  10. gratist
    Member
    Posted 5 hours ago #

    hi i experienced the same situation as Ryan. I didnt change host or change domain.. simply made mistakes in erasing some files. So I tried to reinstall WP and upload the old DB.

    I browsed the table and comments and they are all not empty. In term of size the .sql file is about 5 MB so I assume it should not be an empty DB.

    However, I still have not had the previous posts appear again. All I got is a default new WP sites :(

    can you advise me on this?

  11. gratist
    Member
    Posted 4 hours ago #

    finally i managed to solve the puzzle!

    i am using simple script provided by my host to automatically install and upgrade WP. i did not realize that the prefix of my database is wp_ and did not change the value as requested during the installation. No wonder it came up with new database tables!

    i hope this will be useful for others.

Reply

You must log in to post.

About this Topic