简体   繁体   中英

django.db.utils.OperationalError: (2026, 'SSL connection error: SSL_CTX_set_tmp_dh failed')

I'm new to python and django. When I run python manage.py runserver I get this error:

django.db.utils.OperationalError: (2026, 'SSL connection error: SSL_CTX_set_tmp_dh failed')'
mysql Server version: 8.0.13 MySQL Community Server - GPL.

I can't find this error on the web.

I ran into the same error when I tried to connect to MySQL to Python (in Anaconda).

This feed is particularly helpful for various case scenarios leading to the same error. For me, installing openSSL version 1.0.2r in Anaconda, itself, fixed the issue:

$ conda install openssl=1.0.2r

从 Anaconda 安装时我也遇到了这个问题,但我可以使用“use_pure=True”mysql.connector.connect() 参数来解决它。

I got the answer:' https://dev.mysql.com/doc/refman/5.7/en/data-directory-initialization.html '

'shell> bin/mysql_ssl_rsa_setup'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM