pynonymizer icon indicating copy to clipboard operation
pynonymizer copied to clipboard

Database host, username and password should be optional for MySQL

Open balcsida opened this issue 2 years ago • 2 comments

Is your feature request related to a problem? Please describe. MySQL client can accept host, port, username, password and other options through option files (.cnf) Additionally, running pynonymizer currently litters the log with the following warning:

mysql: [Warning] Using a password on the command line interface can be insecure.

Describe the solution you'd like I think these settings could be optional instead of required to run pynonymizer

balcsida avatar Feb 17 '22 16:02 balcsida

Sounds logical.

do you know if this behaviour is similar across the other supported DBs (i.e. postgres, mssql)? I'm just thinking about how best to support this.

rwnx avatar Feb 18 '22 11:02 rwnx

Hey @rwnx,

For PostgreSQL, there is password file(.pgpass file in a user's home directory) that can be used similarly.

For MSSQL, the current CLI (which is in preview stage) supports passing these details as environment variables.

balcsida avatar Feb 18 '22 15:02 balcsida

Hi @balcsida !

Late news, but this feature was released in v1.24.0. for MySQL & postgres, you should be able to use the CLI's respective config files to pass credentials to the database.

Check out the changelog for more info: https://github.com/rwnx/pynonymizer/blob/master/CHANGELOG.md#changed

rwnx avatar Sep 07 '22 20:09 rwnx

Sweeeeeeeet, thank you so much! :bow:

balcsida avatar Sep 09 '22 17:09 balcsida