Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

1K
Views
MySQL ERROR 2026 - Error de conexión SSL - Ubuntu 20.04

Recientemente actualicé el sistema operativo de mi máquina local de Ubuntu 18.04 a 20.04, estoy ejecutando mi servidor MySQL en CentOS (AWS). Publicar la actualización cada vez que intento conectarme al servidor MySQL arroja un error de conexión SSL.

 $ mysql -u yamcha -h database.yourproject.com -p --port 3309 ERROR 2026 (HY000): SSL connection error: error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol

Pero si paso --ssl-mode=disabled junto con ella, puedo conectarme de forma remota.

 $ mysql -u yamcha -h database.yourproject.com -p --port 3309 --ssl-mode=disabled Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 22158946 Server version: 5.7.26 MySQL Community Server (GPL) Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql>

Consultas:

  1. Cómo conectarse sin pasar --ssl-mode=disabled
  2. Cómo pasar esta --ssl-mode=disabled en mi aplicación Django, actualmente la he definido como se muestra a continuación, pero sigo recibiendo el mismo error.
 DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'yamcha', 'USER': 'yamcha', 'PASSWORD': 'xxxxxxxxxxxxxxx', 'HOST': 'database.yourproject.com', 'PORT': '3309', 'OPTIONS': {'ssl': False}, }
over 4 years ago · Santiago Trujillo
6 answers
Answer question

0

Ubuntu 20 ha mejorado el nivel de seguridad. La única forma en que podía conectarme era permitiendo el tls 1.

Edite este archivo:

 /usr/lib/ssl/openssl.cnf

Y poner al principio del archivo:

 openssl_conf = default_conf

Y al final de ese archivo también:

 [ default_conf ] ssl_conf = ssl_sect [ssl_sect] system_default = ssl_default_sect [ssl_default_sect] MinProtocol = TLSv1 CipherString = DEFAULT:@SECLEVEL=1

Me ayudó mucho: https://askubuntu.com/questions/1233186/ubuntu-20-04-how-to-set-lower-ssl-security-level

over 4 years ago · Santiago Trujillo Report

0

Agregue esto a su archivo de configuración del servidor mysql 5.7 y luego reinicie su servicio mysql

 [mysqld] tls_version=TLSv1.2

Ahora debería poder conectarse usando tls 1.2, que es el predeterminado en Ubuntu 20.04


En aras de la exhaustividad, en Ubuntu 20.04 en realidad my.cnf y mysql.cnf son en realidad el mismo archivo. Así que editar cualquiera de los dos funcionará.

 $ readlink -f /etc/mysql/my.cnf /etc/mysql/mysql.cnf
over 4 years ago · Santiago Trujillo Report

0

Bump mysqlclient a v2.X, que agregó la opción ssl_mode , https://github.com/PyMySQL/mysqlclient-python/blob/main/HISTORY.rst

 DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'yamcha', 'USER': 'yamcha', 'PASSWORD': 'xxxxxxxxxxxxxxx', 'HOST': 'database.yourproject.com', 'PORT': '3309', 'OPTIONS': {'ssl_mode': 'DISABLED'}, } }
over 4 years ago · Santiago Trujillo Report

0

Para cualquiera que busque en Google, puede usar este indicador en mysql cmd: --ssl-mode=DISABLED . ES DECIR:

 mysql -uuser -p'myPassw0rd!' -hmysql.company.com --ssl-mode=DISABLED
over 4 years ago · Santiago Trujillo Report

0

Si está utilizando MYSQL Workbench:

Simplemente deshabilite el SSL editando la conexión.

  1. Ir a editar Conexión en el panel de conexión

  2. Seleccione SSL en las opciones después del parámetro como se muestra en la captura de pantalla En la conexión

ingrese la descripción de la imagen aquí

  1. Seleccione Usar SSL: NO

ingrese la descripción de la imagen aquí

  1. Finalmente quedaría así.

ingrese la descripción de la imagen aquí

En clientes que no sean Mysql Workbench también puede intentar deshabilitar SSL

over 4 years ago · Santiago Trujillo Report

0

Si aún desea las funciones de seguridad mejoradas, puede considerar actualizar su servidor mysql a 5.7.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!