Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

1.8K
Vistas
RSA Encryption not supported - caching_sha2_password with django mysql and docker

im trying to connect Mysql with django using docker, and i get this error

2061, 'RSA Encryption not supported - caching_sha2_password plugin was built with GnuTLS support'.

i tried changing user and creating a database with

// create a user //

CREATE USER 'user'@'localhost' IDENTIFIED BY 'user';
GRANT ALL PRIVILEGES ON *.* TO 'user'@'localhost' WITH GRANT OPTION;
CREATE USER 'user'@'%' IDENTIFIED BY 'user';
GRANT ALL PRIVILEGES ON *.* TO 'user'@'%' WITH GRANT OPTION;

// create a database //

CREATE DATABASE user_db;

BUT still the sqme error message

in the settings.py

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': 'user_db',
        'USER': 'user',
        'PASSWORD': 'user',
        'HOST': 'db',
        'PORT': '3306',
    }
}

and in docker-compose:

db:
    image: mysql:latest
    environment:
        MYSQL_DATABASE: 'user_db'
        MYSQL_USER: 'user'
        MYSQL_PASSWORD: user
        MYSQL_ROOT_PASSWORD: root
    volumes:
        - ./data/mysql/db:/var/lib/mysql
    ports: 
        - 3306:3306

thank you for your help.

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

I have solved this changing the conector to mysql-connector-python==8.0.26 instead mysqlclient==2.0.3

Also, connection settings

DATABASES = {
    'default': {
        #'ENGINE':   'django.db.backends.mysql',
        'ENGINE':   'mysql.connector.django',
        'NAME':     getenv('MYSQL_DATABASE'),
        'USER':     getenv('MYSQL_USER'),
        'PASSWORD': getenv('MYSQL_PASSWORD'),
        'HOST':     'db',
        'PORT':     getenv('MYSQL_PORT', 3306),
        'OPTIONS': {
            'auth_plugin': 'mysql_native_password'
        }
    }
}
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda