Skip to content

Commit c55caa7

Browse files
committed
Add README
1 parent e0bff41 commit c55caa7

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# MySQL's login path file reader
2+
3+
Decrypt and parse MySQL's login path file.
4+
5+
See also: https://dev.mysql.com/doc/refman/8.0/en/mysql-config-editor.html
6+
7+
8+
## Example
9+
10+
```console
11+
$ mysql_config_editor set --login-path=client --host=localhost --user=localuser --password
12+
Enter password: <Type password here>
13+
```
14+
15+
```python
16+
import myloginpath, MySQLdb
17+
conf = myloginpath.parse('client')
18+
print(conf) # {'host': 'localhost', 'user': 'localuser', 'password': 'secretstring'}
19+
conn = MySQLdb.connect(**conf, db="myapp")
20+
```

0 commit comments

Comments
 (0)