Bug #117429 MySQL Shell does not support combination of --passwords-from-stdin and --no-wizard
Submitted: 10 Feb 13:25 Modified: 11 Feb 8:38
Reporter: Shayan Patel Email Updates:
Status: Not a Bug Impact on me:
None 
Category:Shell General / Core Client Severity:S3 (Non-critical)
Version:9.2.0 OS:Ubuntu (22.04 LTS)
Assigned to: MySQL Verification Team CPU Architecture:x86

[10 Feb 13:25] Shayan Patel
Description:
We cannot use MySQL Shell's option --passwords-from-stdin with the option --no-wizard. We face `MySQL Error 1045  (28000): Access denied for user` when we use the combination of the two options.

How to repeat:
```
$ mysqlsh --version 
mysqlsh   Ver 9.2.0 for Linux on x86_64 - for MySQL 9.2.0 (MySQL Community Server (GPL))

$ echo '83T3JOQQgLpE2tBy2J8YVxmU' | mysqlsh --passwords-from-stdin --uri=root@127.0.0.1:3306 --python -c "shell.options.set('useWizards', False); print('logged in')" 
Please provide the password for 'root@127.0.0.1:3306': logged in

$ echo '83T3JOQQgLpE2tBy2J8YVxmU' | mysqlsh --no-wizard --passwords-from-stdin --uri=root@127.0.0.1:3306 --python -c "shell.options.set('useWizards', False); print('logged in')" 
MySQL Error 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
```

Suggested fix:
Expectation is that the two options should be able to be used in tandem.
[10 Feb 17:28] Shayan Patel
Confirmed by speaking to Miguel Araújo, that when `--no-wizard` is used, password must be provided by `--password` or must be included in the URI indicated by `--uri`
[11 Feb 8:38] MySQL Verification Team
As Miguel already explained - this is not a bug