Solved

Remote connection to MySQL on Centos

Posted on 2011-02-11
7
1,159 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
Comment Utility
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
Comment Utility
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 82

Expert Comment

by:Dave Baldwin
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 82

Expert Comment

by:Dave Baldwin
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
resolved, needed grant permissions for user..
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
Creating and Managing Databases with phpMyAdmin in cPanel.
This video discusses moving either the default database or any database to a new volume.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

763 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

6 Experts available now in Live!

Get 1:1 Help Now