Support » Fixing WordPress » Database errors and trying to post my first blog entry

  • Resolved gregscott


    Hello – my website is The website has a bunch of static pages and these all work the way I want. I am using the free Responsive theme.

    Now I want to set up a blog posting page. I have a static home page named “Home” and a blank page named “Blog”. In wp-admin, Settings…Reading, I set the front page to “home” and Posts page to “Blog”.

    This should make my blog posts show up in my “Blog” page, right?

    I did my first blog post but when I view the post, I only see sort of a blank page. It displays a page with my logo and menu, everything else blank. I put in a menu selection to navigate to my “Blog” page. When I select this menu, I see the default template for the Responsive theme.

    Looking at error_log, I see errors similar to below every time anyone acceses any page on my website:

    [Fri Mar 22 17:45:40.098973 2013] [:error] [pid 21401] [client] WordPress database error Can’t create/write to file ‘/tmp/#sql_435_0.MYI’ (Errcode: 2) for query SELECT t.*, tt.* FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON tt.term_id = t.term_id INNER JOIN wp_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN (‘post_tag’) AND tr.object_id IN (53) ORDER BY ASC made by require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/responsive/full-width-page.php’), get_header, locate_template, load_template, require_once(‘/themes/responsive/header.php’), wp_head, do_action(‘wp_head’), call_user_func_array, All_in_One_SEO_Pack->wp_head, All_in_One_SEO_Pack->get_all_keywords, get_the_tags, get_the_terms, wp_get_object_terms, referer:

    Something tells me these database errors are related to my blog problem but I am not sure how to troubleshoot it. I am hosting this myself and the /tmp directory is wide open. I can create files in /tmp all day long. How do I attack this problem? What does that error mean and how do I correct it?


    – Greg Scott

Viewing 4 replies - 1 through 4 (of 4 total)
  • WPyogi


    Forum Moderator

    Try deactivating all your plugins and switching to the default theme – that helps identify where the problem may be.

    Thanks @wpyogi

    But before temporarily crippling my website – I stumbled across this link that might be helpful:

    I am hosting my website on a Fedora 18 system and evidently the new systemd does something ugly with /tmp when sqld starts up. Sqld is apparently trying to write its temporary database tables to some other deep down directory that it “thinks” is /tmp. I’m going to dig deeper into this and will post here what I come up with.

    – Greg

    We’re on to something here.

    The gist of that link above is, the new way that Fedora starts up messes with what msqld uses for its private tmp directory. It “thinks” it is using a system wide tmp directory, but in fact it’s using a private tmp directory. Apparently, Fedora removes these private tmp directories periodically – every 10 day or so?

    The net result is, everything works fine for 10 days, then the database errors kick in and strange behavior happens.

    To test this, I just restarted mysqld on my Fedora host and now I can click all over the place in my website with no errors. And I can view my blog post.

    Clicking on my “Blog” menu is still broken, but I’ll have to come back to that later tonight.

    – Greg

    When I put in the latest update for my “Responsive” theme, my “Greg’s Blog” menu started working as expected.

    For anyone else who encounters this thread looking for WordPress database problems, here is a blog entry I put together with links to details on how I dealt with the problem.

    The main thing to remember is, on your web host, watch the error_log file or equivalent generated by httpd. If you see database errors similar to those I posted above, make sure mysqld on your web host really is writing to the tmp file it think it’s using.

    – Greg Scott

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Database errors and trying to post my first blog entry’ is closed to new replies.