Title: SQL Database Error Messing Up Random Posts
Last modified: August 20, 2016

---

# SQL Database Error Messing Up Random Posts

 *  [jamming1](https://wordpress.org/support/users/jamming1/)
 * (@jamming1)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/sql-database-error-messing-up-random-posts/)
 * Hello everyone! I have had this error for about a month now but a random post(
   s) gets completely deleted and this is what pop ups:
 *     ```
       Warning: mysql_connect() [function.mysql-connect]: Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2) in /home/rankable/public_html/linkX/mysql.class.php on line 50
   
       Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2) in /home/rankable/public_html/linkX/mysql.class.php on line 70
   
       Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in /home/rankable/public_html/linkX/mysql.class.php on line 70
   
       Warning: mysql_query() [function.mysql-query]: Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2) in /home/rankable/public_html/linkX/mysql.class.php on line 75
   
       Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/rankable/public_html/linkX/mysql.class.php on line 75
       QUERY ERROR: SELECT * FROM <code>domain</code> WHERE <code>domain</code> LIKE ”
   
       Fatal error: Uncaught exception ‘Exception’ with message ‘Query failed: Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)’ in /home/rankable/public_html/linkX/mysql.class.php:77
       Stack trace:
       #0 [internal function]: Database_MySQL->query(‘SELECT * FROM
       ```
   
 * …’, ‘mywebsite.com’)
    #1 /home/rankable/public_html/linkX/mysql.class.php(57):
   call_user_func_array(Array, Array) #2 /home/rankable/public_html/linkX/mysql.
   class.php(112): Database_MySQL->setQuery(Array) #3 /home/rankable/public_html/
   linkX/XLink.php(4): Database_MySQL->getRow(‘SELECT * FROM `…’, ‘mywebsite.com’)#
   4 {main} thrown in /home/rankable/public_html/linkX/mysql.class.php on line 77`
 * I have no idea how to fix this so any help would be amazing 🙂
 * Thank you!

Viewing 1 replies (of 1 total)

 *  [heatmap](https://wordpress.org/support/users/stuartwider/)
 * (@stuartwider)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/sql-database-error-messing-up-random-posts/#post-3273712)
 * The first thing I would try would be to temporarily disable all plugins to see
   if its plugin related.

Viewing 1 replies (of 1 total)

The topic ‘SQL Database Error Messing Up Random Posts’ is closed to new replies.

## Tags

 * [sql](https://wordpress.org/support/topic-tag/sql/)
 * [sql-error](https://wordpress.org/support/topic-tag/sql-error/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [heatmap](https://wordpress.org/support/users/stuartwider/)
 * Last activity: [13 years, 5 months ago](https://wordpress.org/support/topic/sql-database-error-messing-up-random-posts/#post-3273712)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
