Connection to Mysql installed on Linux from Windows Machines

Posted on 2011-10-11
Last Modified: 2012-05-12
I have a mysql server installed on Centos with Iptables enabled..When I try to access my requests get rejected.I have agiven permission to allow from all hosts using grant all on *.* to 'user'@'%' Identified by 'Password'.

I was not able to connect when IPtables is on...I'm abe to acess when Iptables is off...

I think i should add some thing to IPtables...Please let me know How
Question by:infopeer
    LVL 5

    Expert Comment

    iptables -A INPUT -i eth0 -p tcp -m tcp --dport 3306 -j ACCEPT
    It will be something like this.

    Link will provide some extra info.

    Author Comment

    Peter I put in the rule iptables -A INPUT -i eth0 -p tcp -m tcp --dport 3306 -j ACCEPT and restarted Ip tables and Iptables 6 services.

    I'm not able to connect even
    LVL 4

    Expert Comment

    by:Christopher Raymond Mendoza
    Can you post the actual error message please.

    Author Comment

    Unable to connect to any of the specified MySQL hosts.
    LVL 4

    Expert Comment

    by:Christopher Raymond Mendoza
    Can you please post the result of the commands 'iptables -L' and 'ip6tables -L' please.

    You are using IPv6 right?
    LVL 6

    Accepted Solution

    add the following line to iptable rules
    like:  vi /etc/sysconfig/iptables
    -A INPUT -s X.X.X.X -p tcp -m tcp --dport 3306 -j ACCEPT
    -A INPUT -s -p tcp -m tcp --dport 3306 -j ACCEPT

    replace with X.X.X.X - to your  IP address , who have to access mysql server.

    then restart the iptable by using,
     service iptables restart



    Author Closing Comment


    Featured Post

    Courses: Start Training Online With Pros, Today

    Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

    Join & Write a Comment

    Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
    The purpose of this article is to demonstrate how we can use conditional statements using Python.
    Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
    Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now