Solved

Remote connection to MySQL on Centos

Posted on 2011-02-11
7
1,168 Views
Last Modified: 2012-05-11
Hi,

trying to access a mysql database on a local network but having issues connecting. Also tried to telnet to it and getting "fhost 192...... is not allowed to connect to this mysql server. Below is iptables current setup so it should be working?

target     prot opt source               destination
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:mysql
0
Comment
Question by:andybrooke
  • 4
  • 2
7 Comments
 
LVL 7

Accepted Solution

by:
tlovie earned 500 total points
ID: 34872877
I think you have to add that host to the mysql permissions.  

mysql> CREATE USER 'monty'@'%' IDENTIFIED BY 'some_pass';
mysql> GRANT ALL PRIVILEGES ON *.* TO 'monty'@'%' WITH GRANT OPTION;
0
 

Author Comment

by:andybrooke
ID: 34873266
excellent I can now telnet. Tried to access mysql and now I get Access denied for Superuser@192...... Somthing simple I'm missing now....
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 34873275
Yes, @tlovie is right, you have to have a MySQL user who is allowed to connect remotely AND who has privileges on the database you're trying to use.  MySQL does not provide 'generic' connections.
0
Industry Leaders: 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!

 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 34873296
Telnet doesn't work with MySQL either.  It requires a MySQL client program which is a driver used by PHP and ASP and other programs.
0
 

Author Comment

by:andybrooke
ID: 34873332
I was only using telnet to test the connection. Both your posts have been irrelevant as we have already established I can now telnet remotley.

But now I'm unable to access mysql....
0
 

Author Comment

by:andybrooke
ID: 34875785
Can anybody please help.  I can now telent so the connection is active but it wont let me remote into mysql....
0
 

Author Comment

by:andybrooke
ID: 34876034
resolved, needed grant permissions for user..
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

Suggested Solutions

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

726 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