jazzband / dj-database-url

Use Database URLs in your Django Application.
https://pypi.org/project/dj-database-url/
BSD 3-Clause "New" or "Revised" License
1.48k stars 205 forks source link

MySQL 8.0+ authentication plugin missed, need to change ENGINE in DATABASE from settings.py #217

Closed JongdaeHan closed 8 months ago

JongdaeHan commented 1 year ago

Hello,

I've tried to bind a MySQL service with my django app on a CloudFoundry platform. Being not able to touch anything with given MySQL service, I suffered an error :

Plugin sha256_password could not be loaded: lib/x86_64-linux-gnu/mariadb/plugin/sha256_password.so: cannot open shared object file

The error was avoidable by changing

'ENGINE': 'django.db.backends.mysql' with 'ENGINE': 'mysql.connector.django',

Is there any way to change the engine for given schema?

dthorell commented 1 year ago

Problem here is not "django.db.backends.mysql", but the fact that you have mysqlclient linked against a MariaDB client and not MySQL 8+ client