In mycli, managing the config has been challenging for awhile since we have five places a user can configure their experience, three of which are config files.
- The
~/.my.cnf file ([client] section)
- The login path file, e.g.
~/.mylogin.cnf
- The mycli config file,
~/.myclirc
- The command-line arguments
- The commands in mycli
This issue documents the overall revamp of the config that we're trying to accomplish for version 2.
Tasks
Missing options in mycli's config file to consider adding
These options are currently supported in mycli via the .my.cnf file, so we need to consider adding them to mycli's config file.
- socket
- default-character-set
- ssl-ca
- ssl-cert
- ssl-key
- ssl-cipher
- ssl-mode
- local-infile
- pager (the command itself)
Assorted Background Notes
Previous config-related discussions:
The desire is to balance these three things well:
- Mycli's config is user-friendly
- Switching to mycli from MySQL is a seamless experience
- Mycli and pgcli have a consistent experience
There has been extensive discussion about the false sense of security that the encrypted login path file provides users. Many users have noted how it's not a security feature. In fact, if you have a copy of someone's login path file, you can decrypt it with a single command:
python -c 'from mycli.config import *;print(read_config_file(open_mylogin_cnf(get_mylogin_cnf_path())))'
Mycli now supports storing host/port/database information in its config file: http://www.mycli.net/loginpath#dsn
Another long-term goal is keyring support so that users can use their system's password manager with mycli.
In mycli, managing the config has been challenging for awhile since we have five places a user can configure their experience, three of which are config files.
~/.my.cnffile ([client]section)~/.mylogin.cnf~/.myclircThis issue documents the overall revamp of the config that we're trying to accomplish for version 2.
Tasks
.my.cnfand.mylogin.cnfto the mycli config file (allows user input to override this feature and control password migration).my.cnfand.mylogin.cnf-- "one config file to rule them all"Missing options in mycli's config file to consider adding
These options are currently supported in mycli via the
.my.cnffile, so we need to consider adding them to mycli's config file.Assorted Background Notes
Previous config-related discussions:
The desire is to balance these three things well:
There has been extensive discussion about the false sense of security that the encrypted login path file provides users. Many users have noted how it's not a security feature. In fact, if you have a copy of someone's login path file, you can decrypt it with a single command:
python -c 'from mycli.config import *;print(read_config_file(open_mylogin_cnf(get_mylogin_cnf_path())))'Mycli now supports storing host/port/database information in its config file: http://www.mycli.net/loginpath#dsn
Another long-term goal is keyring support so that users can use their system's password manager with mycli.