Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't connect to MySQL from other machine

Status
Not open for further replies.

mpwiedemann

Programmer
Oct 29, 2002
1
US
I have just installed several RH8.0 boxes with MySQL and I can't seem to connect to the MySQL server from another machine. I can connect locally just fine. I have created a root account like 'root@%'. I do not have any firewalling setup on the machines and MySQL is listening on port 3306. When I try to connect I get the following message:

"ERROR 2013: Lost connection to MySQL server during query"

I have been working with MySQL on Windows machines for quite some time now and have never had this problem. This is my first attempt to install a MySQL server on a Linux box. Please help, I'm pulling my hair out!!!
 
Second that. I am having the identical set up, and I have encountered the same problem.
I have looked at the error log at the /var/log/mysql, it does not give me any more useful information, other than the fact that everytime there is a remote connection (remote doesn't necessary from different machine, by the way), mysql daemon crashes and safe_mysqld will restart the daemon automatically.

Because I tried phpMySQLAdmin on the same machine and encountered the same problem, I suspect either there is something wrong with the deamon, the safe_mysql script, or the permission set up on the "mysql" user.

Experts, please help me out on this one. Since the error log doesn't give me any more information other than the daemon crashed and restarted... i have no idea how to tackle the problem.

Thanks in advance

Harv
,__,
(..)____
(__) )\
kngharv ||--|| *
 
Did some research... it seems that MySQL has problem with glibc library on Linux.

Does anyone knows which verison of glibc library would work on Redhat 8 and Mysql 3.23?

Harv
,__,
(..)____
(__) )\
kngharv ||--|| *
 
Later versions of RedHat disables xinetd services by default, and also has a tendency to setup a firewall on install, both of these things may be affecting you being able to connect.

worth a look in /etc/xinetd.d to see whats disabled and what isn't, also turn off any firewall as an additional test to see if that is causing the problem. ______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
in my case, i have make sure I have disabled *ALL* the firewalls, that shouldn't be the problem.

Though I am pretty sure glibc is the problem,
I am a bit reluctant to replace glibc libraries. i have broken my SUSE distribution by doing exactly that in the past.
,__,
(..)____
(__) )\
kngharv ||--|| *
 
I was also having trouble getting connected to mysql from a remote client throught the internet (ODBC and PHPSQLAdmin). I kept getting:

"ERROR 2013: Lost connection to MySQL server during query"

although I could connect locally just fine. So I knew my permissions were o.k. in mysql and it was something with the hostname or related.

This problem seems to be a known bug from the upgraded glibc libraries. The error log in mysql I have been getting is: "mysql process hanging....." in /var/log/mysqld.log. It is discussed in detail here:



The temporary solution that worked for me was to enter the client ip and hostname in /etc/hosts
example: 192.168.1.1 anyserver.com

Hope this helps......

Mike
 
In my particular case (after couple RPM installation and couple linux installation), I have found the problem is not the glibc library (though it did cause the problm in the past, but not this particular distribution).

I actually solved the problem by re-examining the file permission on the MySQL table. Make sure your remote MySQL user has the access to both read and write the permission table. in my particular case, all the problem went away after I turn on both read and write permission.

good luck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top