Skip to content

SSL options ignored when using read_default_file option #144

@travispaul

Description

@travispaul

I have a cnf file that works with the MySQL client:

[root@host ~]# cat /root/.my.cnf
[client]
user = someuser
password = somepass
host = some.remote.host
ssl-ca = /etc/pki/mysql/rds-combined-ca-bundle.pem
[root@host ~]# mysql
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MySQL connection id is 7576589
Server version: 5.6.10 MySQL Community Server (GPL)

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MySQL [(none)]> show status like 'Ssl_cipher';
+---------------+--------------------+
| Variable_name | Value              |
+---------------+--------------------+
| Ssl_cipher    | DHE-RSA-AES256-SHA |
+---------------+--------------------+
1 row in set (0.00 sec)

MySQL [(none)]>

However, when using this file with MySQLdb, the SSL options appear to be ignored:

>>> import MySQLdb
>>> db=MySQLdb.connect(read_default_file="/root/.my.cnf")
>>> db.query("show status like 'Ssl_cipher'")
>>> r=db.store_result()
>>> r.fetch_row()
(('Ssl_cipher', ''),)

Using version 1.2.5 on CentOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions