WordPress.org

Ready to get started?Download WordPress

Forums

Sudden SQL error preventing site access (6 posts)

  1. saintehlers
    Member
    Posted 2 years ago #

    my site: http://thelemur.net

    When I access my site on the front end I get this error:

    Error establishing a database connection

    when I go to a page in the admin area, I get this error:

    Error establishing a database connection

    This either means that the username and password information in your wp-config.php file is incorrect or we can't contact the database server at localhost. This could mean your host's database server is down.

    Are you sure you have the correct username and password?
    Are you sure that you have typed the correct hostname?
    Are you sure that the database server is running?

    If you're unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums.

    In the error log, this is the same entry for the last several attempts:

    01-Oct-2011 07:50:49] WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 for query SELECT * FROM eee_post_sorting WHERE category = made by require, wp, WP->main, WP->query_posts, WP_Query->query, WP_Query->get_posts, apply_filters_ref_array, call_user_func_array, post_sorting

    (naturally, the timestamp changes, but the rest is the same)

    This was working last night. And as a friend was able to respond to a post earlier today (he spoke to me about it on Twitter) i assume that even about an hour ago it was working.

    The other WordPress sites on the same server are working and the database is accessible with the same user/password through phpMyAdmin

    so... any idea?

  2. MickeyRoush
    Member
    Posted 2 years ago #

    Have you tried to repair your database via phpMyAdmin? May want to make a backup copy first.

  3. joewitchwicky
    Member
    Posted 2 years ago #

    Ok try this. try to access the config file with your hosting control panel and check whether the data base path is correct. If it's then check the password, the hosting account and the database passwords should be same otherwise you will get this error. If all this are ok then try to contact your hosting support.

    [Stop posting your advertisement junk on these forums]

  4. saintehlers
    Member
    Posted 2 years ago #

    Unfortunately, repairing doesn't change anything

    The path and user information are correct, but I went ahead into the database and reset the password just to be sure.

    I'll try to get hold of my host, but if anyone else has any ideas, I'd love to hear them.

  5. cubecolour
    ɹoʇɐɹǝpoɯ
    Posted 2 years ago #

    Do you take regular backups of your database? If so when was the last one taken?

    Your host may have a backup, but you can't always rely on that.

  6. joewitchwicky
    Member
    Posted 2 years ago #

    saintehlers, what are you using? a paid hosting or free hosting. If it's a paid hosting then try to download the previously backed up database alone and restore it. If it doesn't works, ask them to fix it as it may be a hosting related issue.

Topic Closed

This topic has been closed to new replies.

About this Topic