Support » Fixing WordPress » WordPress database error: [MySQL server has gone away]

  • I have encountered this error several times in the last 5 months on GoDaddy servers. Each time, GoDaddy has blamed WordPress. was working just fine with 2.04-2.07 with the exception of the 3, now 4, [MySQL server has gone away] instances.

    Why is GoDaddy telling me the problem is with the template or with WordPress?

Viewing 15 replies - 1 through 15 (of 39 total)
  • It should give you more of an error than that. Like where the server is disappearing. (ie an actual file name and line number)

    Here is a screen shot:

    The problem appears to be with my Live Feed script called CARP.

    When CAPR is removed, loads just fine.

    When CARP is in place, you get


    Does the screen shot help?

    I too have been getting this recently. It only happened once I started using the new version of wordpress, 2.1.2. It was a completely fresh install too. It sounds like a bug? It has happened mostly on the Dashboard, which has no customizations on it.

    Well, when I removed the CARP things bascially were restored to normal, but I still had the CARP database running in the background. It’s just that I removed the script that called the CARP database from my splash page.

    I am still having difficulty saving new posts and saving edits to old posts. This is rsulting in time outs. Strange.

    But most certaining CARP is doing something, because when I add it back the site refuses to load.

    Deleted duplicate post

    I have also been getting this error on a hosting account. I only seem to get it when I try to post a new entry using the WordPress interface (normally I use endo).

    The full error is as follows:

    WordPress database error: [Lost connection to MySQL server during query]
    DELETE FROM wp_postmeta WHERE Post_ID = 594 AND meta_key = 'sticky';
    WordPress database error: [MySQL server has gone away]
    INSERT INTO wp_postmeta (post_id,meta_key,meta_value) VALUES ('594','_pingme','1')
    WordPress database error: [MySQL server has gone away]
    INSERT INTO wp_postmeta (post_id,meta_key,meta_value) VALUES ('594','_encloseme','1')
    WordPress database error: [MySQL server has gone away]
    SELECT ID FROM wp_posts WHERE TRIM(to_ping) != '' LIMIT 1
    WordPress database error: [MySQL server has gone away]
    SELECT post_id FROM wp_postmeta WHERE meta_key = '_pingme' OR meta_key = '_encloseme' LIMIT 1

    When I check to see if the post was saved in WordPress, it is and everything is fine. But I don’t like getting this error message and would like to fix it if it’s broken.

    That site’s running WordPress 2.0.4.

    I decided to switch to Host Gator because GD refuses to deal with the issue. This has been ongoing since I went with GD, and I am convinced the issue is with hos GD runs their shared database servers.

    I may be wrong about my assumptions, but their refusal to even consider the possibility was enough to lose my business.

    PS: I too noticed that in spite of the errors, posts are saved. It is quite annoying to have your site time out over and over and then discover that all your waiting was pointless because the changes were saved. It wastes tremendous amounts of time.

    PS: I too noticed that in spite of the errors, posts are saved. It is quite annoying to have your site time out over and over and then discover that all your waiting was pointless because the changes were saved. It wastes tremendous amounts of time.

    I’m getting a ton of this lately too. Sometimes the site loads fine, other times it grinds to a blank page. Other times it give me the database has gone away error. The Dashboard definitely does not agree, either. I use GoDaddy. Is the only solution to switch hosts?

    Well, I don’t honestly know, but GD keeps telling me that we have to “optimize our script” for wordpress and yet they OFFER WordPress as one of their freebie software packages.

    I think GD is full of crap. So yeah, I decided that switching hosts was my best option.

    If you switch hosts though, do your research. I have found that Host Gator is highly thought of and highly rated by every host rating survey I have found. Once I switched, I found their 24 hour live chat tech support to be very helpful as well as fast. Their CPANEL, once you get use to is, is great. It is the equivalent of Host Manager Control Panel.

    The database management is a bit different from GD in that Host Gator names their DB files uniquely. This means that you will have to back up all your GD databses and then import their content to your new databases at Host Gator. That is not hard to do, but because Host Gator names the databases a bit differently from what you are use to at GD, you will need to adjust your new wp-config file to reflect changes in DB User, DB Name, DB Password etc.

    Also, if you switch, make sure you keep your GD account active until you are absolutely certain your new site at Host Gator (or whatever service you choose) is working.

    Host Gator will also do a migrate of your entire root directory for free, but they warn (and correctly so) that some files might get left behind during the transfer process. So, once a transfer is done, you will want to check your newly relocated image/content folders for all your image files, plugins and related images, themes and related images, uploads folders etc.

    To help with this, what I chose to do was back up my entire WordPress directory onto my local machine as well as keeping my GD web site active.

    Once the transfer is complete (about 24 hours), I changed my GD name servers to Host Gator name servers, pointing my domain to Host Gator servers. That way, I could test my new site at Host Gator servers. Once I figured out what needed to be tweaked, I switched BACK to GD name servers so that my old site would have as little downtime as possible.

    I am now doing some tweaking of the new site, using an FTP program to upload any and all straggler files, updating wp from 2.07 to 2.09 etc. Once all that is done, I will change the nameservers once more to point to Host Gator. Hopefully by thien it will all work smoothly.

    If you have any trouble, come back to this thread and post your questions.

    I want to confirm that GoDaddy is being completely unhelpful about this. I now have one of my blogs “grinding to a halt” (as someone else noted above) while loading. After a certain point, the “MySQL server has gone away” error message appears at each point that data from the database should appear on the page.

    I called tech support and they claimed that they checked the connection on my database, but they never asked me which one was having the problem and they refuse to admit that they made changes in the settings to MySQL or PHP on their side. If they didn’t change anything and I didn’t change anything then why am I having these problems?

    GoDaddy was down for a bunch of hours right before this problem started. I wonder if something screwy happened then. I just wish they’d stop denying the problem and research it.

    Right now I’m on hold waiting for another person to pick up. I think they try to drive you nuts with their hold music.

    I just spoke to a GoDaddy supervisor and got this problem escalated.

    It’s VERY important that anyone who is having this problem get in touch with GoDaddy support and tell them about it. Be sure to use the exact error message, “MySQL server has gone away” and tell the support person that the problem has been escalated and you might have additional information for the admins.

    The problem appears to be timeout related, as it happens about 95% of the time on one of my sites that has a lot of database queries. That site is still on WordPress 2.0.4.

    All of my sites display the error message when I post new content or edit existing content, even though the new or revised post appears online okay.

    I don’t want to move to a new server. I just want this fixed. Trouble is, so many people call GoDaddy with questions about WordPress that aren’t GoDaddy-related (plugin errors, coding errors, etc.) that GoDaddy support is “programmed” to simply refuse to help. Then, when we have a real problem that may really be related to the server, we can’t get them to look at it.

    Good point.

    Trust me, I did the excalation thing. I got no where.

    The reason I got nowhere is because from their end they claimed that they saw no problem and everything appeared to be working normally.

    Yes, I gave them the exact error. I gave them a laundry list of what was going wrong with my site and they told me everything looked fine from their end.

    I would be interested in knowing if they fix the problem for you. In my case, they didn’t. In my case, the refused to look at it any further.

    Here is a follow-up to my site transfer:


Viewing 15 replies - 1 through 15 (of 39 total)
  • The topic ‘WordPress database error: [MySQL server has gone away]’ is closed to new replies.