Forums

[resolved] database backup - urgent help please (15 posts)

  1. rhusari
    Member
    Posted 4 months ago #

    I backed up my database using the exact steps here under simple back:
    http://codex.wordpress.org/WordPress_Backups#Simple_Backup
    But the website disappeared and instead I got this message:
    "Error establishing a database connection".
    What did I do wrong? How do I get it back?

  2. esmi
    Member
    Posted 4 months ago #

    Have you checked with your hosting provider to see if they currently have a mysql server problem? If you followed the instructions on the page mentioned, it's highly unlikely that it was anything that you did.

  3. rhusari
    Member
    Posted 4 months ago #

    It doesn't look like a server problem at that end. When I log on back to mysql, all the tables are still there. And Yes I did follow the instructions, clicked go and saved the downloaded file to my desktop -- but now I'm thinking maybe I checked some boxes I wasn't supposed to??

  4. rhusari
    Member
    Posted 4 months ago #

    I get this message when trying to open the site with IE:

    The website cannot display the page
    HTTP 500
    Most likely causes:
    The website is under maintenance.
    The website has a programming error.

  5. esmi
    Member
    Posted 4 months ago #

    Have you checked the backup file? Does it look like it contains data as well as the table structures?

    If you think the database was damaged, you could try restoring it using the very backup you just created.

    http://codex.wordpress.org/Restoring_Your_Database_From_Backup

  6. rhusari
    Member
    Posted 4 months ago #

    Thanks esmi. The backup file on my desktop is in a notepad format with a .sql extension. Is that how it's supposed to look?

  7. esmi
    Member
    Posted 4 months ago #

    Yes but it's more what's within the file. A decent backup should contain some very long lines such as:

    INSERT INTOwp_posts(ID,post_author,post_date,post_date_gmt,post_content,post_title,post_excerpt,post_status,comment_status,ping_status,post_password,post_name,to_ping,pinged,post_modified,post_modified_gmt,post_content_filtered,post_parent,guid,menu_order,post_type,post_mime_type,comment_count) VALUES ('1', '1', '2009-07-02 10:01:44', '2009-07-02 14:01:44', 'Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!', 'Hello world!', '', 'publish', 'open', 'open', '', 'hello-world', '', '', '2009-07-02 10:01:44', '2009-07-02 14:01:44', '', '0', 'http://www.domain.com/?p=1', '0', 'post', '', '1');

  8. rhusari
    Member
    Posted 4 months ago #

    Reviewing my steps, I think I have checked extra boxes under structure and Data that I wasn't supposed to. Can I still restore the database using the backup done this way? Thanks.

  9. rhusari
    Member
    Posted 4 months ago #

    Yes, it looks so but I'm still wondering whether it contains more than it should...here are a few lines from the top. Do they look correct to you? thanks again.

    @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
    /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
    /*!40101 SET NAMES utf8 */;

    --
    -- Database: myblog
    --

    -- --------------------------------------------------------

    --
    -- Table structure for table wp_comments
    --

    DROP TABLE IF EXISTS wp_comments;
    CREATE TABLE IF NOT EXISTS wp_comments (
    comment_ID bigint(20) unsigned NOT NULL auto_increment,
    comment_post_ID int(11) NOT NULL default '0',
    comment_author tinytext NOT NULL,
    comment_author_email varchar(100) NOT NULL default '',
    comment_author_url varchar(200) NOT NULL default '',
    comment_author_IP varchar(100) NOT NULL default '',
    comment_date datetime NOT NULL default '0000-00-00 00:00:00',
    comment_date_gmt datetime NOT NULL default '0000-00-00 00:00:00',
    comment_content text NOT NULL,
    comment_karma int(11) NOT NULL default '0',

  10. esmi
    Member
    Posted 4 months ago #

    I've seen that before on some backups. As far as I'm aware, it shouldn't be a problem.

  11. frioman
    Member
    Posted 4 months ago #

    I backed up once using the host backup method, and my blog dissappeared. After trying several things, I called tech support at the host. They said it was on their end and that it would take a couple hours to fix. They DID correct the problem and my blog was back up in a couple hours.

  12. rhusari
    Member
    Posted 4 months ago #

    thanks frioman. I spoke to tech support, they said the data base is still there but while trying to access it I changed the password (true!) so it's not the same one the website uses to access the database. They said I need to go to wp hostings configuration.php file to correct it. Where do I find this file? I don't see it when I go back to mysql, is it inside one of the tables?
    thanks a lot.

  13. Xamataca
    Member
    Posted 4 months ago #

    how typical is that :D look for the file in your wp folder: wp-config.php

  14. rhusari
    Member
    Posted 4 months ago #

    Thanks Xamataca. I assume that means I'm not the first one to commit that error! Best way to learn. Now I have to figure out where to find that folder..., there are several wp-...etc listed but none is called wp-config.php! or maybe I need to look somewhere else? I know this is basic but first time dealing with phpmyadmin is quite intimidating. will figure it out...

  15. rhusari
    Member
    Posted 4 months ago #

    Done. thanks Xamataca, esmi and frioman. What a learning curve!

Reply

You must log in to post.

About this Topic