Connecting to MySql on a linux Box

cpopham

Well-known member
Joined
Feb 18, 2004
Messages
273
I now have a working mySql server on a Linux Box. I have been able to create a user on the server that has all privilages and can log in from any host. Now I am tryign to login using vb .net and I have the host name from the machine, but I keep getting an error saying host now found. I also get this same error when using Navicat from a remote machine to attempt to connect to the Linux Mysql server. Is there some configuration that I need to do to the Linux box or what? i am using Mandrake 10.1 as the linux version.

Thanks, Chester
 
There are all sorts of possible reasons for not getting connected. Firewalls is one that immediately popped up in my mind.
If I were you Id start with trying to connect using a client program, when thats working try connecting through your own code.
There are a couple of free (GPLd) programs to use including some from the MySQL site. My choise however is SQLYog, which used to be free.

Best of luck!
/Kejpa
 
I have also tried to connect through Navicat, but am getting the same error. We have an external firewall to filter Internet traffic, but there is not a firewall between my PC and the linux PC. I can get into any of the other XP boxes, but it is almost as though the host name is being hidden on the network. I am wonderign if Linux or this version can hide the host name as a security precaution?

Chester
 
How is your network resolving computer names?

If you are using a windoze network, it is probably using SMB/NMB to resolve names. If your mySql box is not configured to use Samba, it will not be broadcasting its name across the SMB subnet, and therefore name resolution will fail.

You have a few solutions available:

1. If you are using DNS internally, set up DNS records for your mysql host
2. If you are NOT using DNS, then configure Samba on the Mysql box
3. If neither of the above are suitable, edit the HOSTS file (c:\windows\system32\drivers\etc\hosts) on EVERY machine, and add a line corresponding to your Mysql box
4. Refer to the machine by IP address
5. Panic

B.
 
Back
Top