Bug #108067 mysql executable does not respect MYSQL_PWD env variable in an InnoDB Cluster
Submitted: 3 Aug 2022 23:25 Modified: 4 Aug 2022 11:04
Reporter: jonnie savell Email Updates:
Status: Not a Bug Impact on me:
None 
Category:Shell General / Core Client Severity:S3 (Non-critical)
Version:8.0.29 OS:Ubuntu (Ubuntu 18.04.5 LTS)
Assigned to: MySQL Verification Team CPU Architecture:x86
Tags: InnoDB Cluster, MYSQL_PWD

[3 Aug 2022 23:25] jonnie savell
Description:
Executable mysql does not respect MYSQL_PWD in an InnoDB Cluster. Specifically, when one exports the MYSQL_PWD environment variable and attempts to connect, the mysql login fails (please see the section on How to repeat). Login for the mysql executable works for MySQL 8.0.29 in a non-clustered environment, however.

How to repeat:
From a node within an InnoDB Cluster, please type the following:

$ export MYSQL_PWD=<<password>>
$ mysql -h <<router address>> -u <<user>> -P 6446
ERROR 1045 (28000): Access denied for user 'aware'@'inpixon' (using password: YES)

Suggested fix:
I seek confirmation of the issue and guidance for a workaround. Given that MYSQL_PWD has been deprecated, I do not see that any fix could reasonably be expected.
[4 Aug 2022 11:04] MySQL Verification Team
Hi,

Do not use deprecated system, use mysql_config_editor 
https://dev.mysql.com/doc/refman/8.0/en/mysql-config-editor.html

to create login path and use --login_path
https://dev.mysql.com/doc/refman/8.0/en/option-file-options.html#option_general_login-path

to login to MySQL Server

Thanks for using MySQL