1

I have a flask app that makes use of a mysql connection that I have successfully run in development mode. To scale the app, I am intending to use a combination of Nginx and uwsgi.

Having setup the wsgi.py file and run the command:

uwsgi --socket 0.0.0.0:5000 --protocol=http -w wsgi:app

I receive the following error message after entering a url (that previously worked under development mode ie flask on its own without uwsgi):

mysql.connector.errors.InterfaceError: 2026 (HY000): SSL connection error: SSL_CTX_new failed

I have tried the solution suggested here: https://forums.mysql.com/read.php?50,671354,671376#msg-671376 however it did not work.

What should I do to solve this error?

1 Answer 1

1

I have found a solution that works for me.

https://stackoverflow.com/a/56497954/9137086

Adding

use_pure=True

to the end of the database connection string

so mine became

connection_string = f'{dialect}+{driver}://{user}:{password}@{host}:{port}/{database}?use_pure=True'
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.