-   Linux - Newbie (
-   -   Error: Lost connection to MySQL server during query (

the expert 08-21-2008 09:10 AM

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!

trickykid 08-21-2008 09:20 AM

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

the expert 08-21-2008 09:39 AM

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)

trickykid 08-21-2008 09:51 AM


Originally Posted by the expert (Post 3254933)
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

the expert 08-21-2008 10:14 AM

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]

tungvs 08-21-2008 10:24 AM

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.

the expert 09-04-2008 12:40 PM

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.


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