Title: MySql error when posting
Last modified: August 19, 2016

---

# MySql error when posting

 *  [asfodel](https://wordpress.org/support/users/asfodel/)
 * (@asfodel)
 * [17 years, 7 months ago](https://wordpress.org/support/topic/mysql-error-when-posting-1/)
 * My blog has started displaying a MySql error whenever I make a post. When I click“
   publish” this is what it reads:
 * Warning: mysql_affected_rows() [function.mysql-affected-rows]: A link to the 
   server could not be established in /home/asfodel/public_html/wp-includes/wp-db.
   php on line 183
    Warning: Cannot modify header information – headers already 
   sent by (output started at /home/asfodel/public_html/wp-includes/wp-db.php:183)
   in /home/asfodel/public_html/wp-includes/pluggable.php on line 275
 * The post still publishes and appears on the site as normal.
 * Can anyone tel me where can I look for the error in order to correct it? Or should
   I just not worry about it???

Viewing 6 replies - 1 through 6 (of 6 total)

 *  [tyler1234](https://wordpress.org/support/users/tyler1234/)
 * (@tyler1234)
 * [17 years, 7 months ago](https://wordpress.org/support/topic/mysql-error-when-posting-1/#post-894495)
 * Mine does a similar thing, though my host (bluehost) brings down my site with
   a CPU overload message. Very annoying! Please help!
 * Here is the snippet from the mysql_slow_queries folder:
 *     ```
       # Tue Nov  4 07:09:18 2008
       # Query_time: 60  Lock_time: 0  Rows_sent: 1096  Rows_examined: 3441
       use REDACTED_wp;
       SELECT <code>ID</code>, <code>post_author</code>, <code>post_date</code>, <code>post_date_gmt</code>, <code>post_status</code>, <code>post_name</code>, <code>post_modified</code>, <code>post_modified_gmt</code>, <code>post_parent</code>, <code>post_type</code>  FROM <code>wp_posts</code> WHERE ((post_status = 'publish' AND post_date_gmt <= '2008-11-04 14:08:59') OR  post_status='static' )  AND post_password='' ORDER BY post_modified DESC
       ```
   
 *  Thread Starter [asfodel](https://wordpress.org/support/users/asfodel/)
 * (@asfodel)
 * [17 years, 7 months ago](https://wordpress.org/support/topic/mysql-error-when-posting-1/#post-894722)
 * What my error message seems to be saying is that wp-includes/wp-db.php and wp-
   includes/pluggable.php have the same command and are interfering with each other?
   But I have never changed either of those flies.
 * Since I recently edited my header and this issue seems to be related to the header,
   could I somehow have messed something up in the header.php or in the css related
   to the header (both of which I altered)?
 * I recently corrected all the validation errors on my site and it now validates,
   so I don’t think there should be any major errors in my code.
 *  [bernardborealis](https://wordpress.org/support/users/bernardborealis/)
 * (@bernardborealis)
 * [17 years, 7 months ago](https://wordpress.org/support/topic/mysql-error-when-posting-1/#post-894738)
 * [@asfodel](https://wordpress.org/support/users/asfodel/): [http://codex.wordpress.org/Answers-Trouble_Shooting#Headers_already_sent](http://codex.wordpress.org/Answers-Trouble_Shooting#Headers_already_sent)
 * [@tyler1234](https://wordpress.org/support/users/tyler1234/): [http://wordpress.org/support/topic/197243?replies=2](http://wordpress.org/support/topic/197243?replies=2)
 *  Thread Starter [asfodel](https://wordpress.org/support/users/asfodel/)
 * (@asfodel)
 * [17 years, 7 months ago](https://wordpress.org/support/topic/mysql-error-when-posting-1/#post-894739)
 * Thank you!
 *  Thread Starter [asfodel](https://wordpress.org/support/users/asfodel/)
 * (@asfodel)
 * [17 years, 7 months ago](https://wordpress.org/support/topic/mysql-error-when-posting-1/#post-894780)
 * I haven’t bee able to fix the problem. I tried the suggestion of holding down
   the delete key for 15 seconds and then retyping the bracket, but that didn’t 
   work.
 * I don’t have a copy of the affected file (wp-db) because I installed wordpress
   via Fantastico and my most recent backup is from after the problem occurred.
 * Is there anywhere I can find a copy of wp-db? My installation is 2.1 (yes, I 
   know I should upgrade…)
 *  Thread Starter [asfodel](https://wordpress.org/support/users/asfodel/)
 * (@asfodel)
 * [17 years, 7 months ago](https://wordpress.org/support/topic/mysql-error-when-posting-1/#post-894792)
 * Since pluggable.php was causing the problem, I tried deactivating the plugins,
   and then reactivating one at a time. I found that the Google XML Sitemaps plugin
   was causing the problem. I guess I can live without a Google sitemap. Is there
   any fix for this?

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘MySql error when posting’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 6 replies
 * 3 participants
 * Last reply from: [asfodel](https://wordpress.org/support/users/asfodel/)
 * Last activity: [17 years, 7 months ago](https://wordpress.org/support/topic/mysql-error-when-posting-1/#post-894792)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
