Web Hosting Forum | Lunarpages

Author Topic: MySQL Issues  (Read 43568 times)

Offline Jason2

  • Intergalactic Superstar
  • *****
  • Posts: 197
    • Tech Support Team
MySQL Issues
« on: March 06, 2008, 11:18:33 AM »
Can't connect to local MySQL server through socket

This means:

1. MySQL crashed, it's not running or it can't find the socket. You need to contact Lunarpages support about this.

2. If your running a vBulletin board, then it means the info in your config.php file is wrong (in which case your forums wouldn't work at all).

Here is more info on this error:

MySQL 5.1:

MySQL 5.0:

MySQL 3.23, 4.0, 4.1:

In Windows:

Lost connection to MySQL server during query

Below are some of the most common reasons to receiving this error:

1. Because you have issued a ``close'' on your MySQL connection and then tried to run a query on the closed connection. You can check that the MySQL hasn't died by executing mysqladmin version and examining the uptime.

2. Are you trying to run a query against your database that is either incorrect or too large? If mysqld gets a packet that is too large or out of order, it assumes that something has gone wrong with the client and closes the connection.

3. Or your host has restarted mySQL. If this is the case, just simply contact the wonderful LunarPages support!

Useful links:

I'll add more when I get around to doing so.

Regards Jason :)
« Last Edit: March 06, 2008, 12:19:58 PM by Jason2 »
"Anyone who has never made a mistake has never tried anything new." -- Albert Einstein

Offline Mitch

  • Berserker Poster
  • *****
  • Posts: 12641
    • MitchKeeler.com
Re: MySQL Issues
« Reply #1 on: March 06, 2008, 11:39:18 AM »
Stickied this, thanks again Jason!
New to Web Site Hosting? Check Out the Lunarpages Blog Hosting Guide!

Follow us @lunarpages on Twitter!
Important Threads: Read This Before Posting! | Lunarforums Rules! | Mitch's Link of the Day!
Also, be sure to check out and subscribe to the Lunartics Blog and the Lunarpages Newsletter !

Need Web Hosting Help? Check out the Lunarpages Web Hosting Wiki. It has tons of tips, tutorials and resources!

Offline Jason2

  • Intergalactic Superstar
  • *****
  • Posts: 197
    • Tech Support Team
Re: MySQL Issues
« Reply #2 on: March 06, 2008, 11:43:55 AM »
Not a problem at all Mitch.


Regards Jason :)
"Anyone who has never made a mistake has never tried anything new." -- Albert Einstein

Offline clever_clown

  • Galactic Royalty
  • *****
  • Posts: 251
Re: MySQL Issues
« Reply #3 on: March 21, 2010, 04:54:12 AM »
I'm trying to execute this command: mysqldump --user=root --password=mypass --all-databases | gzip > db.gz

but it gives an error:
mysqldump: Got error: 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) when trying to connect

With reference to my search, the answer was, this problem is from the hosting company, kindly check the post of LincolnForums through this link out:


Offline findch2

  • Newbie
  • *
  • Posts: 4
Re: MySQL Issues
« Reply #4 on: November 01, 2010, 04:07:38 AM »
I know there is table locking for MySQL It works in your MySQL database.

lock tables temp write;
unlock tables;

But it is too costly in my case. I would prefer row locking. I successfully created a table with ENGINE=InnoDB, however, when I tried row locking by using:


They both error out.

#1064 - 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 'LIMIT 0, 30' at line 2

Do you know how I can do row locking in MySQL?



Offline Lunartique

  • Intergalactic Cowboy
  • *****
  • Posts: 51


Share |