Anathema
Anathema

Reputation: 1

SSL connection error to MySQL with Python 3.7. InterfaceError: SSL connection error: Failed to set ciphers to use

I am new to MySQL and I have recently set up a server for learning and testing purposes. The end goal is to be able to connect to MySQL using ODBC for other computers and with a Python connector from the local computer. I tried to set up the basic connection to MySQL in python with the following code:

import mysql.connector

myDb = mysql.connector.connect(
             host ='localhost',
             user ='username',
             password = 'password');

print(myDb);

But I get the following error message:

InterfaceError: SSL connection error: Failed to set ciphers to use.

There are no SSL certificates created or configured in MySQL, but it keeps giving me this response.

Upvotes: 0

Views: 3302

Answers (1)

Maria Varga
Maria Varga

Reputation: 71

try adding flag 'use_pure' :

db_connection = mysql.connector.connect(host='127.0.0.1', user='root', password='password123',use_pure=True)

Upvotes: 7

Related Questions