Skip to content
Code and Bytes Code and Bytes

Code and Bytes
Code and Bytes

Instalar MySQL 5.7 en Ubuntu 20.04

Posted on 20 September, 20213 October, 2021

A continuación explico la instalación de MySQL 5.7 en Ubuntu 20.04

  1. Descargar e instalar el paquete del repositorio MySQL.
wget wget https://dev.mysql.com/get/mysql-apt-config_0.8.12-1_all.deb
dpkg -i mysql-apt-config_0.8.12-1_all.deb

Si aparece el error:

Warning: apt-key should not be used in scripts (called from postinst maintainerscript of the package mysql-apt-config)
OK

Reinstala y vuelve al paso anterior:

sudo apt-get purge mysql-apt-config
  1. Actualizar el repositorio
sudo apt update

Comprobar la directiva de Ubuntu para la instalación del paquete MySQL.

sudo apt-cache policy mysql-server

La salida es:

mysql-server:
  Installed: (none)
  Candidate: 8.0.26-0ubuntu0.20.04.2
  Version table:
     8.0.26-0ubuntu0.20.04.2 500
        500 http://mirrors.digitalocean.com/ubuntu focal-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages
     8.0.19-0ubuntu5 500
        500 http://mirrors.digitalocean.com/ubuntu focal/main amd64 Packages
     5.7.35-1ubuntu18.04 500
        500 http://repo.mysql.com/apt/ubuntu bionic/mysql-5.7 amd64 Packages

Copiar la versión e instalarla:

sudo apt install -y mysql-client=5.7.35-1ubuntu18.04
sudo apt install -y mysql-community-server=5.7.35-1ubuntu18.04
sudo apt install -y mysql-server=5.7.35-1ubuntu18.04

Prevenir la actualización del paquete:

Comprobar la versión instalada:

dpkg -l | grep mysql

Crear el archivo de configuración necesario para evitar la actualización de MySQL.

sudo nano /etc/apt/preferences.d/mysql

Pegar la versión que nos mostró el comando anterior:

Package: mysql-server
Pin: version 5.7.35-1ubuntu18.04
Pin-Priority: 1001

Package: mysql-client
Pin: version 5.7.35-1ubuntu18.04
Pin-Priority: 1001

Package: mysql-community-server
Pin: version 5.7.35-1ubuntu18.04
Pin-Priority: 1001

Package: mysql-community-client
Pin: version 5.7.35-1ubuntu18.04
Pin-Priority: 1001

Package: mysql-apt-config
Pin: version 0.8.12-1
Pin-Priority: 1001
sudo apt update
Linux MySQL

Post navigation

Previous post
Next post

Related Posts

Ajustar el brillo en Xubuntu

Posted on 12 December, 20125 April, 2014

En algunos portátiles con Xubuntu el brillo al iniciar el sistema operativo está en el nivel mas bajo, para corregirlo debemos abrir la terminal y modificar el archivo /etc/rc.local sudo nano /etc/rc.local Antes de la línea exit 0 escribir lo siguiente: echo 10 > /sys/class/backlight/acpi_video0/brightness Donde a 10 es el…

Read More
Linux

Conectar Centos/Debian a VPN LT2P/IPSEC

Posted on 3 December, 202115 March, 2026

Instalar los paquetes Crear las variables

Read More

Error al instalar Wine: The following signatures couldn’t be verified because the public key is not available

Posted on 17 January, 2020

Cuando ejecutamos sudo apt-get update aparece el error: W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://dl.winehq.org/wine-builds/ubuntu bionic InRelease: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 76F1A20FF987672F W:…

Read More

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Buscar

Categorias

  • AI (2)
  • Asterisk (9)
  • Bases de datos (1)
  • DevOps (4)
  • Git (2)
  • HTML (1)
  • Laravel (6)
  • Linux (67)
  • MCP Server (1)
  • Mikrotik (3)
  • MySQL (5)
  • n8n (1)
  • Personal (4)
  • PHP (15)
  • Python (2)
  • Software recomendado (1)
  • Tips (1)
  • VSCode (4)
  • vTiger (4)
  • Windows (10)
  • Wordpress (4)
©2026 Code and Bytes | WordPress Theme by SuperbThemes