LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 08-21-2008, 09:10 AM   #1
the expert
LQ Newbie
 
Registered: Jul 2008
Posts: 5

Rep: Reputation: 0
Error: Lost connection to MySQL server during query


Currently I am running Red Hat Linux WS 4 and I am having troubles getting mysqld to run properly. Everytime I try to connect to the URL that I have specified I receive the following message:

Software error:

Can't connect to the database.
Error: Lost connection to MySQL server during query
Is your database installed and up and running?
Do you have the correct username and password selected in localconfig?

I'm new to the mysqld so any help would be greatly appreciated!
 
Old 08-21-2008, 09:20 AM   #2
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 197Reputation: 197
Well, see if it's running, it could have crashed.

ps fax | grep mysql

If it returns some mysqld processes, it's most likely running.

Check your mysql logs for errors. In other cases when you see this error, might be too many connections, etc. Also make sure whatever software you are using has the correct credentials, example, can you login to mysql using those credentials from the command line?

mysql -u username -p
 
Old 08-21-2008, 09:39 AM   #3
the expert
LQ Newbie
 
Registered: Jul 2008
Posts: 5

Original Poster
Rep: Reputation: 0
I typed in the command that you had suggested and I got a few lines of random things, but I'm guessing that they are the processes even though they are not properly outlined in the terminal.

I then issued the command: mysql -u username -p and then entered in my proper username and password and the following error was received:

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
 
Old 08-21-2008, 09:51 AM   #4
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 197Reputation: 197
Quote:
Originally Posted by the expert View Post
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
That's probably a good indication its not running at all.

Try starting it up as root:

/etc/init.d/mysqld start
 
Old 08-21-2008, 10:14 AM   #5
the expert
LQ Newbie
 
Registered: Jul 2008
Posts: 5

Original Poster
Rep: Reputation: 0
Okay once I ran that start command from the command line I received the following error:

Timeout error occurred trying to start MySQL Daemon
Starting MySQL: [FAILED]
 
Old 08-21-2008, 10:24 AM   #6
tungvs
Member
 
Registered: May 2008
Distribution: Centos; Ubuntu; Fedora
Posts: 98

Rep: Reputation: 15
Sometimes MySQL does strange behaviors. Once I installed MySQL successfully, but I cannot connect to the server, nor even start the service. the only way that resolve the problem is re-installing. Maybe it can help.
 
Old 09-04-2008, 12:40 PM   #7
the expert
LQ Newbie
 
Registered: Jul 2008
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks!

After a little research into mysql and other files I figured out that the there was not enough space for the database to be fully functional, so after deleting things from the Desktop which was completely full, mysql worked and I was able to complete my work.

So, thanks to everyone that shared their help and advice.

ex
 
  


Reply

Tags
mysqld


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
mysql server connection error alok.rhct Linux - Server 1 10-04-2006 05:55 PM
Lost connection to MySQL server during query figure8car Mandriva 1 12-05-2004 04:28 PM
ERROR 2013: Lost connection to MySQL server during query kicap Linux - Software 0 11-23-2004 08:30 PM
Error: lost connection to MySQL server during query patpawlowski Programming 2 01-23-2004 07:56 AM
Mysql Error: Lost Connection to Mysql during query ramnath Programming 5 11-18-2003 12:27 PM


All times are GMT -5. The time now is 03:04 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration