Instalação MySQL em Ambiente Oracle Enterprise Linux(OEL)
Olá pessoal!
Iremos agora instalar o MySQL no linux a partir dos pacotes RPM.Nessa VM optei pelo OEL pois já faz parte do mesmo pacote de software da Oracle.
1 - Instalar o Oracle Enterprise Linux
Não irei entrar em detalhes nesse tópico.Mais informações no site da oracle abaixo.
https://edelivery.oracle.com/
2- Baixar os fontes do MySQL no endereço abaixo:
ftp://mysql.cce.usp.br/mysql/Downloads/MySQL-5.6/
3 - Descompactar os fontes e copiar para /usr/local/mysql
[root@oralinux u01]# tar -xvf MySQL-5.6.2_m5-1.linux2.6.i386.tar
MySQL-client-5.6.2_m5-1.linux2.6.i386.rpm
MySQL-devel-5.6.2_m5-1.linux2.6.i386.rpm
MySQL-embedded-5.6.2_m5-1.linux2.6.i386.rpm
MySQL-server-5.6.2_m5-1.linux2.6.i386.rpm
MySQL-shared-5.6.2_m5-1.linux2.6.i386.rpm
MySQL-test-5.6.2_m5-1.linux2.6.i386.rpm
[root@oralinux u01]#
4 - Instalar os pacotes
[root@oralinux u01]# rpm -i MySQL-devel-5.6.2_m5-1.linux2.6.i386.rpm
[root@oralinux u01]# rpm -i MySQL-client-5.6.2_m5-1.linux2.6.i386.rpm
[root@oralinux u01]# rpm -i MySQL-shared-5.6.2_m5-1.linux2.6.i386.rpm
[root@oralinux u01]# rpm -i MySQL-server-5.6.2_m5-1.linux2.6.i386.rpm
[root@oralinux u01]# rpm -i MySQL-embedded-5.6.2_m5-1.linux2.6.i386.rpm
[root@oralinux u01]# rpm -i MySQL-test-5.6.2_m5-1.linux2.6.i386.rpm
[root@oralinux u01]# rpm -i MySQL-server-5.6.2_m5-1.linux2.6.i386.rpm
[root@oralinux u01]# rpm -i MySQL-server-5.6.2_m5-1.linux2.6.i386.rpm
110908 14:44:04 [Note] Binlog end
110908 14:44:04 [Note] Shutting down plugin 'partition'
110908 14:44:04 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
110908 14:44:04 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
110908 14:44:04 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
110908 14:44:04 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
110908 14:44:04 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
110908 14:44:04 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
110908 14:44:04 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
110908 14:44:04 [Note] Shutting down plugin 'INNODB_METRICS'
110908 14:44:04 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
110908 14:44:04 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
110908 14:44:04 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
110908 14:44:04 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
110908 14:44:04 [Note] Shutting down plugin 'INNODB_CMPMEM'
110908 14:44:04 [Note] Shutting down plugin 'INNODB_CMP_RESET'
110908 14:44:04 [Note] Shutting down plugin 'INNODB_CMP'
110908 14:44:04 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
110908 14:44:04 [Note] Shutting down plugin 'INNODB_LOCKS'
110908 14:44:04 [Note] Shutting down plugin 'INNODB_TRX'
110908 14:44:04 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
110908 14:44:04 [Note] Shutting down plugin 'ARCHIVE'
110908 14:44:04 [Note] Shutting down plugin 'BLACKHOLE'
110908 14:44:04 [Note] Shutting down plugin 'MyISAM'
110908 14:44:04 [Note] Shutting down plugin 'MRG_MYISAM'
110908 14:44:04 [Note] Shutting down plugin 'MEMORY'
110908 14:44:04 [Note] Shutting down plugin 'CSV'
110908 14:44:04 [Note] Shutting down plugin 'mysql_old_password'
110908 14:44:04 [Note] Shutting down plugin 'mysql_native_password'
110908 14:44:04 [Note] Shutting down plugin 'binlog'
110908 14:44:04 [Note] Binlog end
110908 14:44:04 [Note] Shutting down plugin 'partition'
110908 14:44:04 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
110908 14:44:04 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
110908 14:44:04 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
110908 14:44:04 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
110908 14:44:04 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
110908 14:44:04 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
110908 14:44:04 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
110908 14:44:04 [Note] Shutting down plugin 'INNODB_METRICS'
110908 14:44:04 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
110908 14:44:04 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
110908 14:44:04 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
110908 14:44:04 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
110908 14:44:04 [Note] Shutting down plugin 'INNODB_CMPMEM'
110908 14:44:04 [Note] Shutting down plugin 'INNODB_CMP_RESET'
110908 14:44:04 [Note] Shutting down plugin 'INNODB_CMP'
110908 14:44:04 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
110908 14:44:04 [Note] Shutting down plugin 'INNODB_LOCKS'
110908 14:44:04 [Note] Shutting down plugin 'INNODB_TRX'
110908 14:44:04 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
110908 14:44:04 [Note] Shutting down plugin 'ARCHIVE'
110908 14:44:04 [Note] Shutting down plugin 'BLACKHOLE'
110908 14:44:04 [Note] Shutting down plugin 'MyISAM'
110908 14:44:04 [Note] Shutting down plugin 'MRG_MYISAM'
110908 14:44:04 [Note] Shutting down plugin 'MEMORY'
110908 14:44:04 [Note] Shutting down plugin 'CSV'
110908 14:44:04 [Note] Shutting down plugin 'mysql_old_password'
110908 14:44:04 [Note] Shutting down plugin 'mysql_native_password'
110908 14:44:04 [Note] Shutting down plugin 'binlog'
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h oralinux password 'new-password'
Alternatively you can run:
/usr/bin/mysql_secure_installation
which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.
See the manual for more instructions.
Please report any problems with the /usr/bin/mysqlbug script!
5 - Inicializar o MySQL
[root@oralinux u01]# /etc/init.d/mysql start
Starting MySQL. [ OK ]
As opções do server em linha de comando são
{start|stop|restart|reload|force-reload|status}
6 - Acessando o MySQL
[root@oralinux u01]# mysql -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.6.2-m5 MySQL Community Server (GPL)
Copyright (c) 2000, 2010, 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> show database;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'database' at line 1
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| test |
+--------------------+
4 rows in set (0.00 sec)
mysql>
Pronto!Espero que goste, próximo post iremos falar sobre o MySQL Enterprise Backup.
Até lá..