• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1192
  • Last Modified:

Remote connection to MySQL on Centos

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
andybrooke
Asked:
andybrooke
  • 4
  • 2
1 Solution
 
tlovieCommented:
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
 
andybrookeAuthor Commented:
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
 
Dave BaldwinFixer of ProblemsCommented:
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
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 
Dave BaldwinFixer of ProblemsCommented:
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
 
andybrookeAuthor Commented:
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
 
andybrookeAuthor Commented:
Can anybody please help.  I can now telent so the connection is active but it wont let me remote into mysql....
0
 
andybrookeAuthor Commented:
resolved, needed grant permissions for user..
0

Featured Post

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.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now