Comment 2 for bug 1027075

Revision history for this message
Felipe Reyes (freyes) wrote :

I'm experiencing the same issue, MySQLdb doesn't have SSL support.

Python 2.7.3 (default, Apr 20 2012, 22:39:59)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import MySQLdb
>>> con = MySQLdb.connect('localhost', 'testuser','test623', 'testdb', ssl="foo")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/MySQLdb/__init__.py", line 81, in Connect
    return Connection(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 187, in __init__
    super(Connection, self).__init__(*args, **kwargs2)
_mysql_exceptions.NotSupportedError: client library does not have SSL support

The file _mysql.c (part of MySQLdb) looks for HAVE_OPENSSL, which should be defined in /usr/include/mysql/my_config.h (this file belongs to libmysqlclient-dev)