from mysql.utilities.common.my_print_defaults import MyDefaultsReader
r = MyDefaultsReader()
r.get_group_data('LOGIN-PATH')
{'host': '127.0.0.1', 'password': '*****', 'user': 'root', 'port': 'PORT'}
With .mylogin.cnf generated by mysql_config_editor from MySQL Client 5.7, the password is encoded. my_print_defaults LOGIN-PATH doesn't show the password in plain text but **, while my_print_defaults -s LOGIN-PATH shows the password in plain text. MyDefaultsReader calls my_print_defaults which runs my_print_defaults LOGIN-PATH so that the password param is been filled with asterisks and this causes almost every utilities to fail with ERROR: Access denied for user 'root'@'127.0.0.1' using password: YES.
Maybe calling my_print_defaults with -s option would solve the problem?
P.S. mysql-cli works perfectly with the same .mylogin.cnf.
With .mylogin.cnf generated by mysql_config_editor from MySQL Client 5.7, the password is encoded.
my_print_defaults LOGIN-PATH
doesn't show the password in plain text but **, whilemy_print_defaults -s LOGIN-PATH
shows the password in plain text. MyDefaultsReader calls my_print_defaults which runsmy_print_defaults LOGIN-PATH
so that the password param is been filled with asterisks and this causes almost every utilities to fail withERROR: Access denied for user 'root'@'127.0.0.1' using password: YES
.Maybe calling my_print_defaults with -s option would solve the problem?
P.S. mysql-cli works perfectly with the same .mylogin.cnf.