LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 11-17-2003, 03:51 AM   #1
ramnath
LQ Newbie
 
Registered: Nov 2003
Posts: 5

Rep: Reputation: 0
Mysql Error: Lost Connection to Mysql during query


Hi guys,
I am a newbie to linux and I just manage to get some basic commands running on a Red Hat 8 box. So please be detailed in explaining to me. I finished installing Red hat 8 along with Mysql, PHP, Apache etc. I am not able to connect to the mysql database from any machine on the network though I am able to log on to mysql locally on the linux box. I am also able to access mysql via php installed on the same box. But from any other mac on the network it gives an error "Lost connection to mysql during query". I have checked up the mysql users table and it enables all hosts (%) with the root user name and null pass. Can anyone give me any possible solns. Also I am able to connect to mysql via ssh login as well.

Thanks
 
Old 11-17-2003, 04:34 AM   #2
markus1982
Senior Member
 
Registered: Aug 2002
Location: Stuttgart (Germany)
Distribution: Debian/GNU Linux
Posts: 1,467

Rep: Reputation: 46
Probably MySQL doesn't accept network connections (for security reasons). You need to take a look at /etc/my.cnf (or the path the my.cnf is located within your distribution).

If you come accross skip-networking erase that part since it disables network access ... for more information please consult www.mysql.com
 
Old 11-17-2003, 05:59 AM   #3
ramnath
LQ Newbie
 
Registered: Nov 2003
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks for the reply. I checked out my.cnf. It is not having any thing like skip-networking. Please let me know if there are any other possible solns.
 
Old 11-17-2003, 11:25 AM   #4
markus1982
Senior Member
 
Registered: Aug 2002
Location: Stuttgart (Germany)
Distribution: Debian/GNU Linux
Posts: 1,467

Rep: Reputation: 46
post your my.cnf
 
Old 11-18-2003, 02:14 AM   #5
ramnath
LQ Newbie
 
Registered: Nov 2003
Posts: 5

Original Poster
Rep: Reputation: 0
This is the my.cnf file in my /etc directory:

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
port=3306
skip-innodb

[mysql.server]
user=mysql
basedir=/var/lib

[safe_mysqld]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
 
Old 11-18-2003, 12:27 PM   #6
markus1982
Senior Member
 
Registered: Aug 2002
Location: Stuttgart (Germany)
Distribution: Debian/GNU Linux
Posts: 1,467

Rep: Reputation: 46
what does /var/log/mysqld.log say? anything interesting? did you do flush privileges after granting access?
 
  


Reply


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
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. suziecorbett Linux - Software 8 10-09-2008 01:52 AM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. Dannux Linux - Software 3 03-24-2006 08:44 AM
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


All times are GMT -5. The time now is 05:09 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