Bug #86805 Cannot connect remotely using mysql client without specyfying the port
Submitted: 23 Jun 2017 1:26 Modified: 23 Jun 2017 2:16
Reporter: John Woo Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version:5.7.17 OS:Debian (Jessie)
Assigned to: CPU Architecture:Any
Tags: port, Remote Connection

[23 Jun 2017 1:26] John Woo
Description:
I have set up the mysqld to listen to the remote connections and the users are created with '%';

I have found that I am not able to login using the mysql commandline client without specifying the port parameter even if the mysql is listening on the default port 3306.

The client is version 5.7.17 on Debian Jessie
The server is version 5.7.18 installed on Debian Jessie following http://www.debiantutorials.com/install-mysql-server-5-6-debian-7-8/

How to repeat:
This works:

mysql --host=someremotehostname --port=3306 -u someuser -p somedb

and this does not work:

mysql --host=someremotehostname -u someuser -p somedb
Enter password: 
ERROR 2003 (HY000): Can't connect to MySQL server on 'cache' (111)
[23 Jun 2017 2:16] John Woo
I am sorry, the problem was that the mysql client on the other server is by default used to connect to the Galera DB cluster, so it has a default port setting of 3307. 

So this report is invalid.