Skip to content

Repository files navigation

MySQL's login path file reader

Decrypt and parse MySQL's login path file.

See also: https://dev.mysql.com/doc/refman/8.0/en/mysql-config-editor.html

Install

$ pip install myloginpath

Example

Create login path file with mysql_config_editor command:

$ mysql_config_editor set --login-path=client --host=localhost --user=localuser --passwordEnter password: <Type password here>

Use it from Python:

importmyloginpath, MySQLdbconf=myloginpath.parse('client')
print(conf) # {'host': 'localhost', 'user': 'localuser', 'password': 'secretstring'}conn=MySQLdb.connect(**conf, database="myapp")

About

MySQL's login path file reader

Topics

Resources

Stars

12 stars

Watchers

3 watching

Forks

Releases

Used by

Contributors

Languages