PyMySQL/myloginpath

Name: myloginpath

Owner: PyMySQL

Description: MySQL's login path file reader

Created: 2018-05-08 09:17:27.0

Updated: 2018-05-09 01:42:28.0

Pushed: 2018-05-08 10:57:25.0

Homepage: null

Size: 12

Language: Python

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

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
p install myloginpath
Example

Create login path file with mysql_config_editor command:

sql_config_editor set --login-path=client --host=localhost --user=localuser --password
r password: <Type password here>

Use it from Python:

rt myloginpath, MySQLdb
 = myloginpath.parse('client')
t(conf)  # {'host': 'localhost', 'user': 'localuser', 'password': 'secretstring'}
 = MySQLdb.connect(**conf, db="myapp")

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.