Description:
When useing '--dba enableXProtocol' --classic must be used.
However if it is not no error is given but mysqlsh tries to connect to the server with the new protocol, but on the port where mysql listens for the classic protocol... Which gives a not-so-helpful error.
How to repeat:
[dvaneeden@dve-mac msb_5_7_14]$ mysqlsh --user=msandbox --password=msandbox --port=5714 --socket=/tmp/mysql_sandbox5714.sock --dba enableXProtocol
mysqlx: [Warning] Using a password on the command line interface can be insecure.
Creating an X Session to msandbox@localhost:5714
MySQL Error (2027): Unknown message received from server 10
[dvaneeden@dve-mac msb_5_7_14]$ mysqlsh --user=msandbox --password=msandbox --port=5714 --socket=/tmp/mysql_sandbox5714.sock --dba enableXProtocol --classic
mysqlx: [Warning] Using a password on the command line interface can be insecure.
Creating a Classic Session to msandbox@localhost:5714
No default schema selected.
enableXProtocol: Installing plugin mysqlx...
enableXProtocol: done
Suggested fix:
1. auto enable --classic if '--dba enableXProtocol' is used
OR return an error like "Error: '--dba enableXprotocol' requires '--classic'"
2. If a connection is made to the 'classic' port instead of the mysqlx port return a useful error.
"Error: detected classic protocol on localhost:5714, use --classic to connect in classic mode or specify the mysqlx port of the server, which is 33060 by default"