Bug #110141 mysqlsh: unknown option --loose-default-character-set
Submitted: 20 Feb 14:55 Modified: 22 Feb 20:22
Reporter: John Nicholls Email Updates:
Status: Verified Impact on me:
None 
Category:Shell General / Core Client Severity:S2 (Serious)
Version:8.0.32 OS:Any
Assigned to: CPU Architecture:Any
Tags: mysql-shell, mysqlsh

[20 Feb 14:55] John Nicholls
Description:
mysqlsh no longer works when 'loose' prefix is used.  This is not maintaining stated compatibility with all versions of 5.7 and 8.0.

It is not even possible to obtain version installed - seems somewhat bizarre to need config files in order to respond to that?

# mysqlsh
While processing defaults options:
mysqlsh: unknown option --loose-default-character-set

# mysqlsh -V
While processing defaults options:
mysqlsh: unknown option --loose-default-character-set

# mysqlsh --version
While processing defaults options:
mysqlsh: unknown option --loose-default-character-set

If we comment out a line

# grep loose-default_character_set /etc/my.cnf.d/utf8_unicode_ci.cnf -B1
[client]
#loose-default_character_set = utf8

then it is possible to obtain version

# mysqlsh --version
mysqlsh   Ver 8.0.32 for Linux on x86_64 - for MySQL 8.0.32 (MySQL Community Server (GPL))

How to repeat:
Include within config

[client]
loose-default_character_set = utf8

Suggested fix:
Make mysqlsh work like it used to in 8.0.27 (the last version we used)
[22 Feb 20:22] MySQL Verification Team
Hi,

Thank you for the report.
[26 Apr 2:31] Juan Rene Ramirez Monarrez
Posted by developer:
 
Hi Bogdan

Thanks for the bug report, in 8.0.32 we included support for standard mysql options file, but the handling of the loose options was out of the scope.

We will have to implement this, in the meantime, you can achieve the previous behavior by using the --no-defaults command line option.

rennox
[1 May 22:31] Marcos Albe
Hello folks,
Does not look like --no-defaults suggested by developers is a valid option:

~$ mysqlsh --version
mysqlsh   Ver 8.0.31 for Linux on x86_64 - for MySQL 8.0.31 (MySQL Community Server (GPL))

~$ mysqlsh --no-defaults
mysqlsh: unknown option --no-defaults

Also, mysqlsh help output suggests this as an example
> mysqlsh -- util check-for-server-upgrade --user=root --host=localhost
--password=xxx

Based on syntax also documented in --help:
> mysqlsh [OPTIONS] [URI] -- <object> <method> [<method-args>...]

But this always fails, no matter what object/method you try; For example:

~$ mysqlsh -- cluster status
mysqlsh: unknown option -- cluster status

or

~$ mysqlsh  -- util check-for-server-upgrade root@localhost --output-format=JSON
mysqlsh: unknown option -- util check-for-server-upgrade root@localhost --output-format

Broken? Outdated docs? Something less obvious that I'm doing wrong?

Thanks!!
[1 May 22:34] Marcos Albe
With 8.0.32 we get slightly different error:

root@sql1:~# mysqlsh --version
mysqlsh Ver 8.0.32 for Linux on x86_64 - for MySQL 8.0.32-24 (Source distribution)

root@sql1:~# mysqlsh -- util checkForServerUpgrade root@localhost:3306 --target-version=8.0.32 --config-path=/etc/mysql/my.cnf
ERROR: There is no object registered under name 'util'