Skip to content
master
Go to file
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
May 8, 2018
May 8, 2018
May 8, 2018

README.md

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 --password
Enter password: <Type password here>

Use it from Python:

import myloginpath, MySQLdb
conf = myloginpath.parse('client')
print(conf)  # {'host': 'localhost', 'user': 'localuser', 'password': 'secretstring'}
conn = MySQLdb.connect(**conf, db="myapp")
You can’t perform that action at this time.