Describe the bug
I am trying to use read_default_file to configure the pymysql connection
To Reproduce
Use pymysql version 1.0.2.
Have a mysql config file like:
[mysql]
comments=1
default-character-set = utf8mb4
host = databasehost.example.com
database = dbname
ssl_key = /etc/mysql/client/key.pem
ssl_cert = /etc/mysql/client/cert.pem
ssl_ca = /etc/mysql/client/ca.pem
Code:
import pymysql
conn = pymysql.connect(
read_default_file=database_default_file,
read_default_group='mysql',
user=username, password=password, autocommit=True)
and if the user grant requires SSL it fails to connect.
If I change the code to
import pymysql
conn = pymysql.connect(
read_default_file=database_default_file,
read_default_group='mysql',
user=username, password=password, autocommit=True,
ssl_ca="/etc/mysql/client/ca.pem",
ssl_cert= "/etc/mysql/client/cert.pem",
ssl_key="/etc/mysql/client/key.pem")
It connects
Expected behavior
The ssl parameters don't have to be separately specified.
Environment
- OS: NixOS
- Server and version: mysql Ver 15.1 Distrib 10.1.47-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2
- PyMySQL version: 1.0.2
Additional context
Add any other context about the problem here.
Describe the bug
I am trying to use
read_default_fileto configure the pymysql connectionTo Reproduce
Use pymysql version 1.0.2.
Have a mysql config file like:
Code:
and if the user grant requires SSL it fails to connect.
If I change the code to
It connects
Expected behavior
The ssl parameters don't have to be separately specified.
Environment
Additional context
Add any other context about the problem here.