?
Solved

Remote connection to MySQL on Centos

Posted on 2011-02-11
7
Medium Priority
?
1,180 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
7 Comments
 
LVL 7

Accepted Solution

by:
tlovie earned 2000 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 84

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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 84

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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 …
Containers like Docker and Rocket are getting more popular every day. In my conversations with customers, they consistently ask what containers are and how they can use them in their environment. If you’re as curious as most people, read on. . .
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

765 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