Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Connection to Mysql installed on Linux from Windows Machines

Posted on 2011-10-11
7
Medium Priority
?
239 Views
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
0
Comment
Question by:infopeer
7 Comments
 
LVL 5

Expert Comment

by:peter197911
ID: 36947922
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.
http://www.cyberciti.biz/tips/linux-iptables-18-allow-mysql-server-incoming-request.html
0
 

Author Comment

by:infopeer
ID: 36948261
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
0
 
LVL 4

Expert Comment

by:Christopher Raymond Mendoza
ID: 36948904
Can you post the actual error message please.
0
Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

 

Author Comment

by:infopeer
ID: 36948985
Unable to connect to any of the specified MySQL hosts.
0
 
LVL 4

Expert Comment

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

You are using IPv6 right?
0
 
LVL 6

Accepted Solution

by:
mohansahu earned 750 total points
ID: 36954517
Hi,
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
OR
-A INPUT -s 10.10.20.0/24 -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

MS




0
 

Author Closing Comment

by:infopeer
ID: 37074617
thanks
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
This article will show you step-by-step instructions to build your own NTP CentOS server.  The network diagram shows the best practice to setup the NTP server farm for redundancy. ┬áThis article also serves as your NTP server documentation.
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.:
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month20 days, 22 hours left to enroll

810 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