dbcli / mycli

A Terminal Client for MySQL with AutoCompletion and Syntax Highlighting.
http://mycli.net
Other
11.39k stars 657 forks source link

Without Password in alias_dsn but fail connection immediately instead of ask for password #692

Open kioipp opened 5 years ago

kioipp commented 5 years ago

Version : 1.19.0

In Docs showed:

If a password is not supplied and mycli cannot connect to the server, it will prompt you to enter one. This is helpful so you do not have to store your password in a plaintext configuration file.

So I write the infomation in .myclirc:

[alias_dsn]
hk-light = mysql://read_only_user@xxxrds.com:3306/gateway

Run connetion:

λ mycli -d hk-light
(1045, u'Authentication Failed For RDS maybe username or password is incorrect')

If I full filled the password in .myclirc:

[alias_dsn]
hk-light = mysql://read_only_user:password@xxxrds.com:3306/gateway

The run the same connetion:

λ mycli -d hk-light
mysql 5.6.16-log
mycli 1.19.0
Chat: https://gitter.im/dbcli/mycli
Mail: https://groups.google.com/forum/#!forum/mycli-users
Home: http://mycli.net
Thanks to the contributor - Scrappy Soft
gateway>

So how can I use DSN but not leave the plain password text ?

qiaohao9 commented 5 years ago

it works for me.

Is caused by other reasons?