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
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Decrypt and parse MySQL's login path file.
See also: https://dev.mysql.com/doc/refman/8.0/en/mysql-config-editor.html
p install myloginpath
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")