Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/72.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/96.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用Python 3.7与MySQL的SSL连接错误。InterfaceError:SSL连接错误:无法设置要使用的密码_Mysql_Python 3.x_Ssl - Fatal编程技术网

使用Python 3.7与MySQL的SSL连接错误。InterfaceError:SSL连接错误:无法设置要使用的密码

使用Python 3.7与MySQL的SSL连接错误。InterfaceError:SSL连接错误:无法设置要使用的密码,mysql,python-3.x,ssl,Mysql,Python 3.x,Ssl,我是MySQL新手,最近我为学习和测试目的设置了一个服务器。最终目标是能够使用ODBC连接到其他计算机上的MySQL,并使用本地计算机上的Python连接器。我尝试使用以下代码在python中设置到MySQL的基本连接: import mysql.connector myDb = mysql.connector.connect( host ='localhost', user ='username', passwor

我是MySQL新手,最近我为学习和测试目的设置了一个服务器。最终目标是能够使用ODBC连接到其他计算机上的MySQL,并使用本地计算机上的Python连接器。我尝试使用以下代码在python中设置到MySQL的基本连接:

import mysql.connector

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

print(myDb);
但我收到以下错误消息:

InterfaceError:SSL连接错误:无法设置要使用的密码


MySQL中没有创建或配置SSL证书,但它一直给我这个响应。

尝试添加标志“use\u pure”:

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