Actualizar MySQL 5.5 a 5.7 en CentOS 6

# Estar seguro que yum esta actualizado

$ yum update yum

# Instalar yum-utils (que proporciona yum-config-manager)

$ yum install yum-utils

# Backup: dump todas las databases a all_dbs.sql

$ mysqldump --lock-all-tables --all-databases -u root -p >/root/all_dbs.sql

# Detener MySQL

$ service mysqld stop

# Descargar la ultima versión de MySQL para CentOS 6

$ wget https://dev.mysql.com/get/mysql80-community-release-el6-2.noarch.rpm
$ sudo rpm -Uvh mysql80-community-release-el6-2.noarch.rpm
$ yum repolist all | grep mysql
$ sudo yum-config-manager --enable mysql57-community
$ sudo yum-config-manager --disable mysql80-community
$ yum update mysql

# Iniciar MySQL

$ service mysqld start

# Si obtiene algún error, debe eliminar las variables obsoletas en /etc/my.cnf
Para este paso se necesita ejecutar el siguiente comando:

$ mysqld --help --verbose | head -n13
mysqld Ver 8.0.16 for Linux on x86_64 (MySQL Community Server - GPL)
Copyright (c) 2000, 2019, 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.
Starts the MySQL database server.
Usage: mysqld [OPTIONS]
Default options are read from the following files in the given order:
/etc/my.cnf /etc/mysql/my.cnf /usr/etc/my.cnf ~/.my.cnf

Con este comando te mostrara los errores que tiene my.cnf, como variables obsoletas entre otros.
# Actualizar databases existentes

$ mysql_upgrade -u root -p

# Pruebas:

$ mysql -v
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 460
Server version: 5.7.25 MySQL Community Server (GPL)
Copyright (c) 2000, 2019, 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.
Reading history-file /root/.mysql_history
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

Loading

Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *

Carrito de compra