Skip to content

Commit 9e55ef1

Browse files
committed
DEBUG: the mariadb connection
1 parent e01a99d commit 9e55ef1

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

check-ssl.py

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/usr/bin/env python
2+
3+
import MySQLdb
4+
5+
config = {
6+
'user': 'kiwi',
7+
'password': 'kiwi',
8+
'host': '127.0.0.1',
9+
'ssl': {
10+
# 'ca': '/home/senko/Kiwi/tests/db-certs/ca.pem',
11+
# 'cert': '/home/senko/Kiwi/tests/db-certs/client-cert.pem',
12+
# 'key': '/home/senko/Kiwi/tests/db-certs/client-key.pem',
13+
}
14+
}
15+
16+
db = MySQLdb.connect(**config)
17+
cur = db.cursor()
18+
cur.execute("SHOW STATUS LIKE 'Ssl_cipher'")
19+
print(cur.fetchone())
20+
cur.close()
21+
db.close()

0 commit comments

Comments
 (0)