LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 03-18-2008, 03:08 AM   #1
mfdarvesh
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, 03:39 PM   #2
hob
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.

http://dev.mysql.com/doc/refman/5.0/...ss-denied.html
 
Old 03-20-2008, 12:25 AM   #3
mfdarvesh
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, 11:17 AM   #4
hrfister
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
Code:
#skip-networking
In /etc/my.cnf [mysqld] I also set
Code:
bind-address=<myserveripaddress>
instead of bind-address=127.0.0.1

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

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:

http://www.centos.org/docs/4/html/rh...-firewall.html

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, 08:30 AM   #5
rlhartmann
Member
 
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
Quote:
--port=3306:tcp
to the file /etc/sysconfig/system-config-securitylevel.
 
  


Reply

Tags
mysql


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


All times are GMT -5. The time now is 05:31 AM.

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