Bug #94412 MySQL Shell with --sql mode does not properly authenticate
Submitted: 20 Feb 2019 13:56 Modified: 26 Feb 2019 12:29
Reporter: Oli Sennhauser Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Document Store: MySQL Shell Severity:S3 (Non-critical)
Version:8.0.15 OS:Linux (ubuntu 14.04 / fedora 29 rhel 6 and 7)
Assigned to: CPU Architecture:x86

[20 Feb 2019 13:56] Oli Sennhauser
Description:
MySQL Shell with SQL mode does not authenticate properly when redirected over MySQL Router 8.0.15.

How to repeat:
$ ./mysqlsh --user=root --host=127.0.0.1 --port=6447 --password='' --sql --execute='select @@port'
@@port
3313
$ ./mysqlsh --user=root --host=127.0.0.1 --port=6447 --password='' --sql --execute='select @@port'
@@port
3313
$ ./mysqlsh --user=root --host=127.0.0.1 --port=6447 --password='' --sql --execute='select @@port'
@@port
3313

vs.

$ mysql --user=root --host=127.0.0.1 --port=6447 --password='' --execute='select @@port'
+--------+
|   3313 |
+--------+
$ mysql --user=root --host=127.0.0.1 --port=6447 --password='' --execute='select @@port'
+--------+
| @@port |
+--------+
|   3314 |
+--------+
$ mysql --user=root --host=127.0.0.1 --port=6447 --password='' --execute='select @@port'
+--------+
| @@port |
+--------+
|   3313 |
+--------+
[26 Feb 2019 12:29] Umesh Shastry
Hello Oli,

Thank you for the report and feedback.

regards,
Umesh
[12 Nov 2019 11:56] Juan Rene Ramirez Monarrez
Posted by developer:
 
Hi Guys

I fail to reproduce this issue using the indicated versions of the shell and router (or any other version).

One thing I noted on the attached file, is that when the sandboxes are deployed, it appears like a password is not being set for the root account. This would deploy it with an empty password and so the authentication as attempted when done through the router would succeed.

The reason I mention this is because I deployed a sandbox and when I type a password when prompted, I see asteriscs when the password is typed, those asteriscs are not present in the attached file.

    Please enter a MySQL root password for the new instance: ******
    Deploying new MySQL instance...

An example of the attached file:

    Please enter a MySQL root password for the new instance:
    Deploying new MySQL instance...

If I am missing something here, please let me know.