Instalar MySQL 5.6 en Fedora 19

Debido que Fedora 19 no incluye a Mysql como parte de su instalación pues en su lugar lo ha remplazado con MariaDb, me he animado a escribir este artículo donde aprenderemos cómo instalar Mysql 5.6 en Fedora 19 tal y como aprendimos a hacerlo con CentOs en un artículo anterior.

Para instalar MySQL 5.6  debemos descargar primero los siguientes paquetes:

  • Shared components
  • Client Utilities
  • MySQL Server

Para ello iremos al sitio de descargas de MySQL y seleccionaremos como distribución “Oracle & Red Hat Linux Enterprise” tal como vemos en la siguiente imagen:

 

mysqlencentos

 

Descargaremos el rpm correspondiente a la arquitectura de nuestro servidor, en mi caso serán las versiones de 64 bits. La descarga podemos hacerla desde el propio navegador o podemos hacerla desde la terminal usando wget. Para ejecutar la terminal deberás dar click en el menú actividades y escribir terminal como puede apreciarse en la siguiente pantalla:

 

Fedora19-terminal

*** Importante. Te recomiendo autenticarte como root para realizar la instalación de Mysql. Para ello debes escribir en la terminal el comando su root

Ejecutaremos lo siguiente para descargar los paquetes de instalación necesarios para 64 bits:

[root@localhost edgar]# wget http://cdn.mysql.com/Downloads/MySQL-5.6/MySQL-server-5.6.12-2.el6.x86_64.rpm

[root@localhost edgar]# wget http://cdn.mysql.com/Downloads/MySQL-5.6/MySQL-client-5.6.12-2.el6.x86_64.rpm

[root@localhost edgar]# wget http://cdn.mysql.com/Downloads/MySQL-5.6/MySQL-shared-5.6.12-2.el6.x86_64.rpm

Una vez que hayamos descargado los paquetes comenzaremos con la instalación. El primer paquete a instalar será el del servidor. Ejecutaremos lo siguiente en la terminal:

rpm -ivh MySQL-server-5.6.12-1.el6.x86_64.rpm

Nos aparecerá en la terminal algo muy parecido a lo siguiente:

[root@localhost edgar]# rpm -ivh MySQL-server-5.6.12-1.el6.x86_64.rpm 
Preparando...                         ################################# [100%]
Actualizando / instalando...
   1:MySQL-server-5.6.12-1.el6        ################################# [100%]
2013-07-06 00:36:01 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2013-07-06 00:36:01 2653 [Note] InnoDB: The InnoDB memory heap is disabled
2013-07-06 00:36:01 2653 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2013-07-06 00:36:01 2653 [Note] InnoDB: Compressed tables use zlib 1.2.3
2013-07-06 00:36:01 2653 [Note] InnoDB: Using Linux native AIO
2013-07-06 00:36:01 2653 [Note] InnoDB: Not using CPU crc32 instructions
2013-07-06 00:36:01 2653 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2013-07-06 00:36:01 2653 [Note] InnoDB: Completed initialization of buffer pool
2013-07-06 00:36:01 2653 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!
2013-07-06 00:36:01 2653 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB
2013-07-06 00:36:01 2653 [Note] InnoDB: Database physically writes the file full: wait...
2013-07-06 00:36:02 2653 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB
2013-07-06 00:36:02 2653 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB
2013-07-06 00:36:03 2653 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
2013-07-06 00:36:03 2653 [Warning] InnoDB: New log files created, LSN=45781
2013-07-06 00:36:03 2653 [Note] InnoDB: Doublewrite buffer not found: creating new
2013-07-06 00:36:03 2653 [Note] InnoDB: Doublewrite buffer created
2013-07-06 00:36:03 2653 [Note] InnoDB: 128 rollback segment(s) are active.
2013-07-06 00:36:03 2653 [Warning] InnoDB: Creating foreign key constraint system tables.
2013-07-06 00:36:03 2653 [Note] InnoDB: Foreign key constraint system tables created
2013-07-06 00:36:03 2653 [Note] InnoDB: Creating tablespace and datafile system tables.
2013-07-06 00:36:03 2653 [Note] InnoDB: Tablespace and datafile system tables created.
2013-07-06 00:36:03 2653 [Note] InnoDB: Waiting for purge to start
2013-07-06 00:36:03 2653 [Note] InnoDB: 5.6.12 started; log sequence number 0
A random root password has been set. You will find it in '/root/.mysql_secret'.
2013-07-06 00:36:03 2653 [Note] Binlog end
2013-07-06 00:36:03 2653 [Note] InnoDB: FTS optimize thread exiting.
2013-07-06 00:36:03 2653 [Note] InnoDB: Starting shutdown...
2013-07-06 00:36:05 2653 [Note] InnoDB: Shutdown completed; log sequence number 1625977

2013-07-06 00:36:05 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2013-07-06 00:36:05 2676 [Note] InnoDB: The InnoDB memory heap is disabled
2013-07-06 00:36:05 2676 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2013-07-06 00:36:05 2676 [Note] InnoDB: Compressed tables use zlib 1.2.3
2013-07-06 00:36:05 2676 [Note] InnoDB: Using Linux native AIO
2013-07-06 00:36:05 2676 [Note] InnoDB: Not using CPU crc32 instructions
2013-07-06 00:36:05 2676 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2013-07-06 00:36:05 2676 [Note] InnoDB: Completed initialization of buffer pool
2013-07-06 00:36:05 2676 [Note] InnoDB: Highest supported file format is Barracuda.
2013-07-06 00:36:05 2676 [Note] InnoDB: 128 rollback segment(s) are active.
2013-07-06 00:36:05 2676 [Note] InnoDB: Waiting for purge to start
2013-07-06 00:36:05 2676 [Note] InnoDB: 5.6.12 started; log sequence number 1625977
2013-07-06 00:36:06 2676 [Note] Binlog end
2013-07-06 00:36:06 2676 [Note] InnoDB: FTS optimize thread exiting.
2013-07-06 00:36:06 2676 [Note] InnoDB: Starting shutdown...
2013-07-06 00:36:07 2676 [Note] InnoDB: Shutdown completed; log sequence number 1625987

A RANDOM PASSWORD HAS BEEN SET FOR THE MySQL root USER !
You will find that password in '/root/.mysql_secret'.

You must change that password on your first connect,
no other statement but 'SET PASSWORD' will be accepted.
See the manual for the semantics of the 'password expired' flag.

Also, the account for the anonymous user has been removed.

In addition, you can run:

  /usr/bin/mysql_secure_installation

which will also give you the option of removing the test database.
This is strongly recommended for production servers.

See the manual for more instructions.

Please report any problems with the /usr/bin/mysqlbug script!

The latest information about MySQL is available on the web at

  http://www.mysql.com

Support MySQL by buying support/licenses at http://shop.mysql.com

New default config file was created as /usr/my.cnf and
will be used by default by the server when you start it.
You may edit this file to change server settings

[root@localhost edgar]#

 

De esta manera tendremos instalado nuestro servidor MySQL cuyo password de root puede encontrarse en el archivo /root/.mysql_secret tal y como se indica en el texto resultante en la consola veamos si esto es correcto. Abriremos con nano o vi el archivo mencionado encontrándonos lo siguiente:

mysql_default_password

Ahora, vamos a instalar los paquetes faltantes:

 

[root@localhost edgar]# rpm -ivh MySQL-client-5.6.12-1.el6.x86_64.rpm 
Preparando...               ########################################### [100%]
   1:MySQL-client           ########################################### [100%]
[root@localhost edgar]# rpm -ivh MySQL-shared-5.6.12-1.el6.x86_64.rpm
Preparando...               ########################################### [100%]
   1:MySQL-shared           ########################################### [100%]

 

Como podemos ver hasta este punto nuestro servidor MySQL se encuentra instalado y ejecutándose. Así que para finalizar este artículo nos conectaremos al servidor y actualizaremos nuestro password:

Y ahora vamos a iniciar nuestro servidor MySQL:

 

[root@localhost edgar]# service mysql start
Starting MySQL. SUCCESS!

 

Como podemos ver hasta este punto nuestro servidor MySQL se encuentra instalado y ejecutándose. Así que para finalizar este artículo nos conectaremos al servidor y actualizaremos nuestro password:

 

[root@localhost edgar]# mysql -uroot -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.6.11

Copyright (c) 2000, 2013, 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> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('MYPASSWORDSECRETO');
Query OK, 0 rows affected (0,00 sec)

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0,00 sec)

mysql>

 

Y hemos terminado de instalar MySQL 5.6 en nuestro servidor Fedora 19.

 

4 Comments

Deja un comentario