Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 03-18-2008, 04:08 AM   #1
LQ Newbie
Registered: Feb 2007
Posts: 21

Rep: Reputation: 15
Connecting Linux Mysql from Windows XP ODBC

I have installed CentOS 4.4 and Mysql on it, it is working. I have windowsxp client and I want to connect that machine to Linux MySql through ODBC, when trying to create DSN, it says "clientxp.lan is not allowed to connect this server" "clientxp" is xp machine. Are some special steps are required to take on Linux server to connect it through windows?
Old 03-18-2008, 04:39 PM   #2
Senior Member
Registered: Mar 2004
Location: Wales, UK
Distribution: Debian, Ubuntu
Posts: 1,075

Rep: Reputation: 45
It's probably a configuration issue on the server - you need to make sure that: the MySQL service permits remote connections, the system firewall allows access to the MySQL service, and that you have setup an account that can login from that system or network (the "host" piece of the username must be correct for the XP client). This is not likely to be a Windows-specific issue.

This page walks you through pretty much every possibility.
Old 03-20-2008, 01:25 AM   #3
LQ Newbie
Registered: Feb 2007
Posts: 21

Original Poster
Rep: Reputation: 15
Thanks, Hob, the referred link is very much informative and I am able to solve my problem. Thanks again
Old 01-11-2010, 12:17 PM   #4
LQ Newbie
Registered: Jan 2008
Posts: 10

Rep: Reputation: 0
Similar problem

I had a similar problem trying to connect to a database from Windows using ODBC to mysql on a Centos server. After creating a log in account and giving priviliges and grants on mysql, I did the following...

I made sure my.cnf was set correctly

In /etc/my.cnf under [mysqld] commented out
In /etc/my.cnf [mysqld] I also set
instead of bind-address=

In the /etc/hosts.allow, I listed
I added an iptable rule:
/sbin/iptables -A INPUT -i eth0 -p tcp --destination-port 3306 -j ACCEPT
I saved it:
/etc/init.d/iptables save
I restarted the firewall:
/etc/init.d/iptables restart
I then checked the /etc/sysconfig/iptables file and I saw the entry:
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT

I rebooted the network service and nothing! I even rebooted the server, and nothing!

I gave up for the night and the next morning decided to use GUI settings on Centos. I came across this page:

I added port 3306 with the "Security Level Configuration Tool"

I tested again AND IT FINALLY WORKED!!!

I am not sure why adding it on the shell with the iptable command did not work, but at least it works now.

I know this is an old post but I'd though I'd add this in case others run into similar problems.

Good luck!
Old 05-24-2010, 09:30 AM   #5
Registered: Mar 2008
Posts: 73

Rep: Reputation: 16
When modifying the IPTABLE configuration from the command line to allow MySQL connections, you must also add the line
to the file /etc/sysconfig/system-config-securitylevel.



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
Connecting to MySql using ODBC RickyO Ubuntu 4 01-30-2008 05:21 PM
MySQL ODBC Driver problem (with MS Windows) gd2shoe Linux - Software 4 11-14-2005 02:50 PM
MySQL ODBC driver fails when trying to add a DSN to MySQL banjoman Linux - Software 0 01-24-2005 10:59 AM
access Windows ODBC from Linux PHP Psykoral Linux - Software 2 12-15-2003 08:32 AM
nstalling ODBC provider for MYSQL in Linux saravanan1979 Programming 0 06-03-2002 02:44 AM

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

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