Bug #81919 mysql monitor doesn't won't connect to subdomain
Submitted: 19 Jun 2016 18:16 Modified: 21 Aug 2017 14:51
Reporter: Allen Holub Email Updates:
Status: No Feedback Impact on me:
Category:MySQL Server: Connection Handling Severity:S2 (Serious)
Version:5.7.13 OS:Mac OS X (10.11.5 (15F34))
Assigned to: CPU Architecture:Any
Tags: monitor

[19 Jun 2016 18:16] Allen Holub
I have a remote mysql instance (not on the local machine, but on the same subnet as my testing platform) that I'm using for testing. So that I can mimic the real database in the application, I've modified /etc/hosts with the following two entries:   macduff   dc2-mysql-01.kattare.com

Everything works fine when I attempt to access the database remotely using

mysql -h -u myusername -pThePassword


mysql -h macduff -u myusername -pThePassword

However, when I use

mysql -h dc2-mysql-01.kattare.com -u myusername -pThePassword

The mysql monitor prints the usual password warning, then hangs. Eventually, there's a timeout and the following message is printed:

ERROR 2003 (HY000): Can't connect to MySQL server on 'dc2-mysql-01.kattare.com' (60)

Which implies a DNS problem, but the dc2... address works fine in the browser, so it appears to be something mysql related. DNS in mysql is enabled (it recognizes the single-word alias macduff without difficulty).

I'm assuming that I've got the user set up properly, given that I can access the instance using the IP address and the single-word alias. I have a single % as the host name associated with the user. I've also tried creating a user with the dc2... address listed explicitly as a host (and %.%.% as the host), but that didn't help, which seems to imply that this isn't a CREATE USER or GRANT issue.

How to repeat:

mysql -h dc2-mysql-01.kattare.com -u myusername -pmypassword

Suggested fix:
[21 Jul 2017 14:51] MySQL Verification Team

You must have privileges defined for all the users that attempt to connect. to the server. In MySQL user is actually user@host. So, root@localhost is one user, while root@ is another user.

I hope that you have understood.
[22 Aug 2017 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".