Instalando o Oracle Linux 9.6 e MySQL: Guia Passo a Passo para Ambiente de Teste e Desenvolvimento

No universo de bancos de dados, o Oracle Linux se destaca como uma escolha robusta e otimizada para cargas de trabalho corporativas. E, mesmo sendo um sistema operacional associado à Oracle Database, sua leveza e estabilidade o tornam também uma excelente opção para rodar outros SGBDs, como o MySQL, que, também pertence à Oracle.

Neste artigo, mostro como instalar o Oracle Linux do zero e preparar um ambiente funcional com MySQL Community Edition, ideal para testes, desenvolvimento ou aprendizado.

Requisitos do Ambiente

Máquina física ou virtual com no mínimo:

  • 2 GB de RAM

  • 20 GB de disco

  • 2 CPUs

  • Imagem ISO do Oracle Linux (versão mais recente)

  • Conexão com a internet (para atualizar pacotes)

  • Acesso com privilégio root

Baixando e Instalando o Oracle Linux

Passo 1 – Download da ISO - Acesse o site oficial da Oracle e baixe a imagem ISO da versão desejada. Para este guia, usamos o Oracle Linux 9.

Passo 2 – Criação da Máquina Virtual - Com base nos requisitos acima, foi criada uma maquina virtual cm o VirtualBox.


Passo 3 – Instalação do Sistema Operacional
  • Iniciar a maquina com a ISO e escolher a opção Install Oracle Linux 9.6.0.
  • Em seguida, escolha o idioma (sugiro utilizar o inglês).
  • Na seleção de software, escolha a opção "Server with GUI" ou "Minimal Install" (recomendado para servidores). Configure o teclado, rede, timezone e senha do root.



Passo 4 – Atualizando o sistema - o objetivo é garantir que todos os pacotes instalados no Oracle Linux estejam com as versões mais recentes disponíveis nos repositórios oficiais. Essa prática é fundamental por motivos de segurança, estabilidade e compatibilidade.

[root@mysql01 ~]# dnf update -y

Instalando o MySQL no Oracle Linux

Passo 1 - Instalar o MySQL Server.

[root@mysql01 ~]# dnf install -y mysql-server
Last metadata expiration check: 0:26:35 ago on Fri 13 Jun 2025 04:27:14 PM -03.
Dependencies resolved.
=============================================================================================================================================================================================================================================
 Package                                                             Architecture                                  Version                                                    Repository                                                Size
=============================================================================================================================================================================================================================================
Installing:
 mysql-server                                                        x86_64                                        8.0.41-2.el9_5                                             ol9_appstream                                             17 M
Installing dependencies:
 checkpolicy                                                         x86_64                                        3.6-1.el9                                                  ol9_appstream                                            362 k
 libicu                                                              x86_64                                        67.1-9.el9                                                 ol9_baseos_latest                                        9.6 M
 libtirpc                                                            x86_64                                        1.3.3-9.el9                                                ol9_baseos_latest                                        100 k
 mecab                                                               x86_64                                        0.996-3.el9.4                                              ol9_appstream                                            384 k
 mysql-errmsg                                                        x86_64                                        8.0.41-2.el9_5                                             ol9_appstream                                            526 k
 mysql-selinux                                                       noarch                                        1.0.13-1.el9_5                                             ol9_appstream                                             36 k
 perl-AutoLoader                                                     noarch                                        5.74-481.el9                                               ol9_appstream                                             20 k
 perl-B                                                              x86_64                                        1.80-481.el9                                               ol9_appstream                                            195 k
 perl-Carp                                                           noarch                                        1.50-460.el9                                               ol9_appstream                                             34 k
 perl-Class-Struct                                                   noarch                                        0.66-481.el9                                               ol9_appstream                                             21 k
 perl-Data-Dumper                                                    x86_64                                        2.174-462.el9                                              ol9_appstream                                             60 k
 perl-Digest                                                         noarch                                        1.19-4.el9                                                 ol9_appstream                                             35 k
 perl-Digest-MD5                                                     x86_64                                        2.58-4.el9                                                 ol9_appstream                                             41 k
 perl-Encode                                                         x86_64                                        4:3.08-462.el9                                             ol9_appstream                                            1.8 M
 perl-Errno                                                          x86_64                                        1.30-481.el9                                               ol9_appstream                                             13 k
 perl-Exporter                                                       noarch                                        5.74-461.el9                                               ol9_appstream                                             37 k
 perl-Fcntl                                                          x86_64                                        1.13-481.el9                                               ol9_appstream                                             19 k
 perl-File-Basename                                                  noarch                                        2.85-481.el9                                               ol9_appstream                                             16 k
 perl-File-Path                                                      noarch                                        2.18-4.el9                                                 ol9_appstream                                             36 k
 perl-File-Temp                                                      noarch                                        1:0.231.100-4.el9                                          ol9_appstream                                             67 k
 perl-File-stat                                                      noarch                                        1.09-481.el9                                               ol9_appstream                                             16 k
 perl-FileHandle                                                     noarch                                        2.03-481.el9                                               ol9_appstream                                             14 k
 perl-Getopt-Long                                                    noarch                                        1:2.52-4.el9                                               ol9_appstream                                             71 k
 perl-Getopt-Std                                                     noarch                                        1.12-481.el9                                               ol9_appstream                                             14 k
 perl-HTTP-Tiny                                                      noarch                                        0.076-462.el9                                              ol9_appstream                                             63 k
 perl-IO                                                             x86_64                                        1.43-481.el9                                               ol9_appstream                                            109 k
 perl-IO-Socket-IP                                                   noarch                                        0.41-5.el9                                                 ol9_appstream                                             49 k
 perl-IO-Socket-SSL                                                  noarch                                        2.073-2.el9                                                ol9_appstream                                            234 k
 perl-IPC-Open3                                                      noarch                                        1.21-481.el9                                               ol9_appstream                                             26 k
 perl-MIME-Base64                                                    x86_64                                        3.16-4.el9                                                 ol9_appstream                                             38 k
 perl-Mozilla-CA                                                     noarch                                        20200520-6.el9                                             ol9_appstream                                             13 k
 perl-Net-SSLeay                                                     x86_64                                        1.94-1.el9                                                 ol9_appstream                                            504 k
 perl-POSIX                                                          x86_64                                        1.94-481.el9                                               ol9_appstream                                             99 k
 perl-PathTools                                                      x86_64                                        3.78-461.el9                                               ol9_appstream                                            108 k
 perl-Pod-Escapes                                                    noarch                                        1:1.07-460.el9                                             ol9_appstream                                             21 k
 perl-Pod-Perldoc                                                    noarch                                        3.28.01-461.el9                                            ol9_appstream                                            116 k
 perl-Pod-Simple                                                     noarch                                        1:3.42-4.el9                                               ol9_appstream                                            272 k
 perl-Pod-Usage                                                      noarch                                        4:2.01-4.el9                                               ol9_appstream                                             48 k
 perl-Scalar-List-Utils                                              x86_64                                        4:1.56-462.el9                                             ol9_appstream                                             81 k
 perl-SelectSaver                                                    noarch                                        1.02-481.el9                                               ol9_appstream                                             10 k
 perl-Socket                                                         x86_64                                        4:2.031-4.el9                                              ol9_appstream                                             62 k
 perl-Storable                                                       x86_64                                        1:3.21-460.el9                                             ol9_appstream                                            100 k
 perl-Symbol                                                         noarch                                        1.08-481.el9                                               ol9_appstream                                             13 k
 perl-Term-ANSIColor                                                 noarch                                        5.01-461.el9                                               ol9_appstream                                             54 k
 perl-Term-Cap                                                       noarch                                        1.17-460.el9                                               ol9_appstream                                             27 k
 perl-Text-ParseWords                                                noarch                                        3.30-460.el9                                               ol9_appstream                                             17 k
 perl-Text-Tabs+Wrap                                                 noarch                                        2013.0523-460.el9                                          ol9_appstream                                             29 k
 perl-Time-Local                                                     noarch                                        2:1.300-7.el9                                              ol9_appstream                                             41 k
 perl-URI                                                            noarch                                        5.09-3.el9                                                 ol9_appstream                                            180 k
 perl-base                                                           noarch                                        2.27-481.el9                                               ol9_appstream                                             15 k
 perl-constant                                                       noarch                                        1.33-461.el9                                               ol9_appstream                                             28 k
 perl-if                                                             noarch                                        0.60.800-481.el9                                           ol9_appstream                                             12 k
 perl-interpreter                                                    x86_64                                        4:5.32.1-481.el9                                           ol9_appstream                                             76 k
 perl-libnet                                                         noarch                                        3.13-4.el9                                                 ol9_appstream                                            157 k
 perl-libs                                                           x86_64                                        4:5.32.1-481.el9                                           ol9_appstream                                            2.7 M
 perl-mro                                                            x86_64                                        1.23-481.el9                                               ol9_appstream                                             27 k
 perl-overload                                                       noarch                                        1.31-481.el9                                               ol9_appstream                                             44 k
 perl-overloading                                                    noarch                                        0.02-481.el9                                               ol9_appstream                                             11 k
 perl-parent                                                         noarch                                        1:0.238-460.el9                                            ol9_appstream                                             15 k
 perl-podlators                                                      noarch                                        1:4.14-460.el9                                             ol9_appstream                                            135 k
 perl-subs                                                           noarch                                        1.03-481.el9                                               ol9_appstream                                             10 k
 perl-vars                                                           noarch                                        1.05-481.el9                                               ol9_appstream                                             11 k
 policycoreutils-python-utils                                        noarch                                        3.6-2.1.el9                                                ol9_appstream                                            113 k
 protobuf-lite                                                       x86_64                                        3.14.0-16.el9                                              ol9_appstream                                            231 k
 python3-audit                                                       x86_64                                        3.1.5-4.0.1.el9                                            ol9_appstream                                             88 k
 python3-distro                                                      noarch                                        1.5.0-7.el9                                                ol9_appstream                                             50 k
 python3-libsemanage                                                 x86_64                                        3.6-5.el9_6                                                ol9_appstream                                             83 k
 python3-policycoreutils                                             noarch                                        3.6-2.1.el9                                                ol9_appstream                                            2.3 M
 python3-setools                                                     x86_64                                        4.4.4-1.el9                                                ol9_baseos_latest                                        802 k
 python3-setuptools                                                  noarch                                        53.0.0-13.el9                                              ol9_baseos_latest                                        1.3 M

Transaction Summary
=============================================================================================================================================================================================================================================
Install  71 Packages

Total download size: 41 M
Installed size: 192 M
Downloading Packages:
(1/71): libtirpc-1.3.3-9.el9.x86_64.rpm                                                                                                                                                                      309 kB/s | 100 kB     00:00
(2/71): python3-setools-4.4.4-1.el9.x86_64.rpm                                                                                                                                                               2.1 MB/s | 802 kB     00:00
(3/71): checkpolicy-3.6-1.el9.x86_64.rpm                                                                                                                                                                     8.8 MB/s | 362 kB     00:00
(4/71): mecab-0.996-3.el9.4.x86_64.rpm                                                                                                                                                                       4.6 MB/s | 384 kB     00:00
(5/71): libicu-67.1-9.el9.x86_64.rpm                                                                                                                                                                          16 MB/s | 9.6 MB     00:00
(6/71): mysql-errmsg-8.0.41-2.el9_5.x86_64.rpm                                                                                                                                                               4.8 MB/s | 526 kB     00:00
(7/71): mysql-selinux-1.0.13-1.el9_5.noarch.rpm                                                                                                                                                              1.4 MB/s |  36 kB     00:00
(8/71): perl-AutoLoader-5.74-481.el9.noarch.rpm                                                                                                                                                              1.2 MB/s |  20 kB     00:00
(9/71): perl-B-1.80-481.el9.x86_64.rpm                                                                                                                                                                       6.5 MB/s | 195 kB     00:00
(10/71): perl-Carp-1.50-460.el9.noarch.rpm                                                                                                                                                                   994 kB/s |  34 kB     00:00
(11/71): python3-setuptools-53.0.0-13.el9.noarch.rpm                                                                                                                                                         3.0 MB/s | 1.3 MB     00:00
(12/71): perl-Class-Struct-0.66-481.el9.noarch.rpm                                                                                                                                                           326 kB/s |  21 kB     00:00
(13/71): perl-Data-Dumper-2.174-462.el9.x86_64.rpm                                                                                                                                                           1.6 MB/s |  60 kB     00:00
(14/71): perl-Digest-1.19-4.el9.noarch.rpm                                                                                                                                                                   1.0 MB/s |  35 kB     00:00
(15/71): perl-Digest-MD5-2.58-4.el9.x86_64.rpm                                                                                                                                                               1.4 MB/s |  41 kB     00:00
(16/71): perl-Errno-1.30-481.el9.x86_64.rpm                                                                                                                                                                  533 kB/s |  13 kB     00:00
(17/71): perl-Exporter-5.74-461.el9.noarch.rpm                                                                                                                                                               1.1 MB/s |  37 kB     00:00
(18/71): perl-Fcntl-1.13-481.el9.x86_64.rpm                                                                                                                                                                  976 kB/s |  19 kB     00:00
(19/71): mysql-server-8.0.41-2.el9_5.x86_64.rpm                                                                                                                                                               33 MB/s |  17 MB     00:00
(20/71): perl-File-Basename-2.85-481.el9.noarch.rpm                                                                                                                                                           73 kB/s |  16 kB     00:00
(21/71): perl-Encode-3.08-462.el9.x86_64.rpm                                                                                                                                                                 4.8 MB/s | 1.8 MB     00:00
(22/71): perl-File-Temp-0.231.100-4.el9.noarch.rpm                                                                                                                                                           1.5 MB/s |  67 kB     00:00
(23/71): perl-File-Path-2.18-4.el9.noarch.rpm                                                                                                                                                                589 kB/s |  36 kB     00:00
(24/71): perl-FileHandle-2.03-481.el9.noarch.rpm                                                                                                                                                             763 kB/s |  14 kB     00:00
(25/71): perl-File-stat-1.09-481.el9.noarch.rpm                                                                                                                                                              503 kB/s |  16 kB     00:00
(26/71): perl-Getopt-Std-1.12-481.el9.noarch.rpm                                                                                                                                                             651 kB/s |  14 kB     00:00
(27/71): perl-HTTP-Tiny-0.076-462.el9.noarch.rpm                                                                                                                                                             2.2 MB/s |  63 kB     00:00
(28/71): perl-Getopt-Long-2.52-4.el9.noarch.rpm                                                                                                                                                              1.4 MB/s |  71 kB     00:00
(29/71): perl-IO-Socket-IP-0.41-5.el9.noarch.rpm                                                                                                                                                             2.6 MB/s |  49 kB     00:00
(30/71): perl-IO-1.43-481.el9.x86_64.rpm                                                                                                                                                                     2.4 MB/s | 109 kB     00:00
(31/71): perl-IO-Socket-SSL-2.073-2.el9.noarch.rpm                                                                                                                                                           7.2 MB/s | 234 kB     00:00
(32/71): perl-IPC-Open3-1.21-481.el9.noarch.rpm                                                                                                                                                              1.0 MB/s |  26 kB     00:00
(33/71): perl-Mozilla-CA-20200520-6.el9.noarch.rpm                                                                                                                                                           842 kB/s |  13 kB     00:00
(34/71): perl-MIME-Base64-3.16-4.el9.x86_64.rpm                                                                                                                                                              868 kB/s |  38 kB     00:00
(35/71): perl-Net-SSLeay-1.94-1.el9.x86_64.rpm                                                                                                                                                                12 MB/s | 504 kB     00:00
(36/71): perl-POSIX-1.94-481.el9.x86_64.rpm                                                                                                                                                                  2.7 MB/s |  99 kB     00:00
(37/71): perl-PathTools-3.78-461.el9.x86_64.rpm                                                                                                                                                              2.9 MB/s | 108 kB     00:00
(38/71): perl-Pod-Perldoc-3.28.01-461.el9.noarch.rpm                                                                                                                                                         4.8 MB/s | 116 kB     00:00
(39/71): perl-Pod-Escapes-1.07-460.el9.noarch.rpm                                                                                                                                                            511 kB/s |  21 kB     00:00
(40/71): perl-Pod-Usage-2.01-4.el9.noarch.rpm                                                                                                                                                                2.6 MB/s |  48 kB     00:00
(41/71): perl-Scalar-List-Utils-1.56-462.el9.x86_64.rpm                                                                                                                                                      3.9 MB/s |  81 kB     00:00
(42/71): perl-SelectSaver-1.02-481.el9.noarch.rpm                                                                                                                                                            532 kB/s |  10 kB     00:00
(43/71): perl-Socket-2.031-4.el9.x86_64.rpm                                                                                                                                                                  2.9 MB/s |  62 kB     00:00
(44/71): perl-Pod-Simple-3.42-4.el9.noarch.rpm                                                                                                                                                               4.0 MB/s | 272 kB     00:00
(45/71): perl-Storable-3.21-460.el9.x86_64.rpm                                                                                                                                                               3.6 MB/s | 100 kB     00:00
(46/71): perl-Symbol-1.08-481.el9.noarch.rpm                                                                                                                                                                 686 kB/s |  13 kB     00:00
(47/71): perl-Term-ANSIColor-5.01-461.el9.noarch.rpm                                                                                                                                                         3.2 MB/s |  54 kB     00:00
(48/71): perl-Term-Cap-1.17-460.el9.noarch.rpm                                                                                                                                                               1.0 MB/s |  27 kB     00:00
(49/71): perl-Text-Tabs+Wrap-2013.0523-460.el9.noarch.rpm                                                                                                                                                    1.3 MB/s |  29 kB     00:00
(50/71): perl-Text-ParseWords-3.30-460.el9.noarch.rpm                                                                                                                                                        513 kB/s |  17 kB     00:00
(51/71): perl-Time-Local-1.300-7.el9.noarch.rpm                                                                                                                                                              2.0 MB/s |  41 kB     00:00
(52/71): perl-base-2.27-481.el9.noarch.rpm                                                                                                                                                                   600 kB/s |  15 kB     00:00
(53/71): perl-constant-1.33-461.el9.noarch.rpm                                                                                                                                                               1.5 MB/s |  28 kB     00:00
(54/71): perl-URI-5.09-3.el9.noarch.rpm                                                                                                                                                                      4.2 MB/s | 180 kB     00:00
(55/71): perl-if-0.60.800-481.el9.noarch.rpm                                                                                                                                                                 695 kB/s |  12 kB     00:00
(56/71): perl-interpreter-5.32.1-481.el9.x86_64.rpm                                                                                                                                                          4.1 MB/s |  76 kB     00:00
(57/71): perl-libnet-3.13-4.el9.noarch.rpm                                                                                                                                                                   4.3 MB/s | 157 kB     00:00
(58/71): perl-mro-1.23-481.el9.x86_64.rpm                                                                                                                                                                    592 kB/s |  27 kB     00:00
(59/71): perl-overload-1.31-481.el9.noarch.rpm                                                                                                                                                               1.7 MB/s |  44 kB     00:00
(60/71): perl-libs-5.32.1-481.el9.x86_64.rpm                                                                                                                                                                  26 MB/s | 2.7 MB     00:00
(61/71): perl-overloading-0.02-481.el9.noarch.rpm                                                                                                                                                            207 kB/s |  11 kB     00:00
(62/71): perl-parent-0.238-460.el9.noarch.rpm                                                                                                                                                                284 kB/s |  15 kB     00:00
(63/71): perl-subs-1.03-481.el9.noarch.rpm                                                                                                                                                                   602 kB/s |  10 kB     00:00
(64/71): perl-vars-1.05-481.el9.noarch.rpm                                                                                                                                                                   512 kB/s |  11 kB     00:00
(65/71): perl-podlators-4.14-460.el9.noarch.rpm                                                                                                                                                              3.4 MB/s | 135 kB     00:00
(66/71): protobuf-lite-3.14.0-16.el9.x86_64.rpm                                                                                                                                                               11 MB/s | 231 kB     00:00
(67/71): python3-audit-3.1.5-4.0.1.el9.x86_64.rpm                                                                                                                                                            4.6 MB/s |  88 kB     00:00
(68/71): python3-distro-1.5.0-7.el9.noarch.rpm                                                                                                                                                               3.0 MB/s |  50 kB     00:00
(69/71): python3-libsemanage-3.6-5.el9_6.x86_64.rpm                                                                                                                                                          4.3 MB/s |  83 kB     00:00
(70/71): policycoreutils-python-utils-3.6-2.1.el9.noarch.rpm                                                                                                                                                 2.0 MB/s | 113 kB     00:00
(71/71): python3-policycoreutils-3.6-2.1.el9.noarch.rpm                                                                                                                                                       32 MB/s | 2.3 MB     00:00
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                                                         23 MB/s |  41 MB     00:01
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                                                                                     1/1
  Installing       : python3-setuptools-53.0.0-13.el9.noarch                                                                                                                                                                            1/71
  Installing       : python3-setools-4.4.4-1.el9.x86_64                                                                                                                                                                                 2/71
  Installing       : python3-distro-1.5.0-7.el9.noarch                                                                                                                                                                                  3/71
  Installing       : perl-Digest-1.19-4.el9.noarch                                                                                                                                                                                      4/71
  Installing       : perl-Digest-MD5-2.58-4.el9.x86_64                                                                                                                                                                                  5/71
  Installing       : perl-B-1.80-481.el9.x86_64                                                                                                                                                                                         6/71
  Installing       : perl-FileHandle-2.03-481.el9.noarch                                                                                                                                                                                7/71
  Installing       : perl-Data-Dumper-2.174-462.el9.x86_64                                                                                                                                                                              8/71
  Installing       : perl-libnet-3.13-4.el9.noarch                                                                                                                                                                                      9/71
  Installing       : perl-base-2.27-481.el9.noarch                                                                                                                                                                                     10/71
  Installing       : perl-URI-5.09-3.el9.noarch                                                                                                                                                                                        11/71
  Installing       : perl-AutoLoader-5.74-481.el9.noarch                                                                                                                                                                               12/71
  Installing       : perl-Mozilla-CA-20200520-6.el9.noarch                                                                                                                                                                             13/71
  Installing       : perl-if-0.60.800-481.el9.noarch                                                                                                                                                                                   14/71
  Installing       : perl-IO-Socket-IP-0.41-5.el9.noarch                                                                                                                                                                               15/71
  Installing       : perl-Time-Local-2:1.300-7.el9.noarch                                                                                                                                                                              16/71
  Installing       : perl-File-Path-2.18-4.el9.noarch                                                                                                                                                                                  17/71
  Installing       : perl-Pod-Escapes-1:1.07-460.el9.noarch                                                                                                                                                                            18/71
  Installing       : perl-Text-Tabs+Wrap-2013.0523-460.el9.noarch                                                                                                                                                                      19/71
  Installing       : perl-IO-Socket-SSL-2.073-2.el9.noarch                                                                                                                                                                             20/71
  Installing       : perl-Net-SSLeay-1.94-1.el9.x86_64                                                                                                                                                                                 21/71
  Installing       : perl-Class-Struct-0.66-481.el9.noarch                                                                                                                                                                             22/71
  Installing       : perl-POSIX-1.94-481.el9.x86_64                                                                                                                                                                                    23/71
  Installing       : perl-Term-ANSIColor-5.01-461.el9.noarch                                                                                                                                                                           24/71
  Installing       : perl-IPC-Open3-1.21-481.el9.noarch                                                                                                                                                                                25/71
  Installing       : perl-subs-1.03-481.el9.noarch                                                                                                                                                                                     26/71
  Installing       : perl-File-Temp-1:0.231.100-4.el9.noarch                                                                                                                                                                           27/71
  Installing       : perl-Term-Cap-1.17-460.el9.noarch                                                                                                                                                                                 28/71
  Installing       : perl-Pod-Simple-1:3.42-4.el9.noarch                                                                                                                                                                               29/71
  Installing       : perl-HTTP-Tiny-0.076-462.el9.noarch                                                                                                                                                                               30/71
  Installing       : perl-Socket-4:2.031-4.el9.x86_64                                                                                                                                                                                  31/71
  Installing       : perl-SelectSaver-1.02-481.el9.noarch                                                                                                                                                                              32/71
  Installing       : perl-Symbol-1.08-481.el9.noarch                                                                                                                                                                                   33/71
  Installing       : perl-File-stat-1.09-481.el9.noarch                                                                                                                                                                                34/71
  Installing       : perl-podlators-1:4.14-460.el9.noarch                                                                                                                                                                              35/71
  Installing       : perl-Pod-Perldoc-3.28.01-461.el9.noarch                                                                                                                                                                           36/71
  Installing       : perl-Fcntl-1.13-481.el9.x86_64                                                                                                                                                                                    37/71
  Installing       : perl-Text-ParseWords-3.30-460.el9.noarch                                                                                                                                                                          38/71
  Installing       : perl-mro-1.23-481.el9.x86_64                                                                                                                                                                                      39/71
  Installing       : perl-IO-1.43-481.el9.x86_64                                                                                                                                                                                       40/71
  Installing       : perl-overloading-0.02-481.el9.noarch                                                                                                                                                                              41/71
  Installing       : perl-Pod-Usage-4:2.01-4.el9.noarch                                                                                                                                                                                42/71
  Installing       : perl-Errno-1.30-481.el9.x86_64                                                                                                                                                                                    43/71
  Installing       : perl-File-Basename-2.85-481.el9.noarch                                                                                                                                                                            44/71
  Installing       : perl-Getopt-Std-1.12-481.el9.noarch                                                                                                                                                                               45/71
  Installing       : perl-MIME-Base64-3.16-4.el9.x86_64                                                                                                                                                                                46/71
  Installing       : perl-Scalar-List-Utils-4:1.56-462.el9.x86_64                                                                                                                                                                      47/71
  Installing       : perl-constant-1.33-461.el9.noarch                                                                                                                                                                                 48/71
  Installing       : perl-Storable-1:3.21-460.el9.x86_64                                                                                                                                                                               49/71
  Installing       : perl-overload-1.31-481.el9.noarch                                                                                                                                                                                 50/71
  Installing       : perl-parent-1:0.238-460.el9.noarch                                                                                                                                                                                51/71
  Installing       : perl-vars-1.05-481.el9.noarch                                                                                                                                                                                     52/71
  Installing       : perl-Getopt-Long-1:2.52-4.el9.noarch                                                                                                                                                                              53/71
  Installing       : perl-Carp-1.50-460.el9.noarch                                                                                                                                                                                     54/71
  Installing       : perl-Exporter-5.74-461.el9.noarch                                                                                                                                                                                 55/71
  Installing       : perl-PathTools-3.78-461.el9.x86_64                                                                                                                                                                                56/71
  Installing       : perl-Encode-4:3.08-462.el9.x86_64                                                                                                                                                                                 57/71
  Installing       : perl-libs-4:5.32.1-481.el9.x86_64                                                                                                                                                                                 58/71
  Installing       : perl-interpreter-4:5.32.1-481.el9.x86_64                                                                                                                                                                          59/71
  Installing       : python3-libsemanage-3.6-5.el9_6.x86_64                                                                                                                                                                            60/71
  Installing       : python3-audit-3.1.5-4.0.1.el9.x86_64                                                                                                                                                                              61/71
  Installing       : protobuf-lite-3.14.0-16.el9.x86_64                                                                                                                                                                                62/71
  Installing       : mysql-errmsg-8.0.41-2.el9_5.x86_64                                                                                                                                                                                63/71
  Installing       : mecab-0.996-3.el9.4.x86_64                                                                                                                                                                                        64/71
  Installing       : checkpolicy-3.6-1.el9.x86_64                                                                                                                                                                                      65/71
  Installing       : python3-policycoreutils-3.6-2.1.el9.noarch                                                                                                                                                                        66/71
  Installing       : policycoreutils-python-utils-3.6-2.1.el9.noarch                                                                                                                                                                   67/71
  Running scriptlet: mysql-selinux-1.0.13-1.el9_5.noarch                                                                                                                                                                               68/71
  Installing       : mysql-selinux-1.0.13-1.el9_5.noarch                                                                                                                                                                               68/71
  Running scriptlet: mysql-selinux-1.0.13-1.el9_5.noarch                                                                                                                                                                               68/71
libsemanage.semanage_direct_install_info: Overriding mysql module at lower priority 100 with module at priority 200.

  Installing       : libtirpc-1.3.3-9.el9.x86_64                                                                                                                                                                                       69/71
  Installing       : libicu-67.1-9.el9.x86_64                                                                                                                                                                                          70/71
  Running scriptlet: mysql-server-8.0.41-2.el9_5.x86_64                                                                                                                                                                                71/71
  Installing       : mysql-server-8.0.41-2.el9_5.x86_64                                                                                                                                                                                71/71
  Running scriptlet: mysql-server-8.0.41-2.el9_5.x86_64                                                                                                                                                                                71/71
  Running scriptlet: mysql-selinux-1.0.13-1.el9_5.noarch                                                                                                                                                                               71/71
  Running scriptlet: mysql-server-8.0.41-2.el9_5.x86_64                                                                                                                                                                                71/71
  Verifying        : libicu-67.1-9.el9.x86_64                                                                                                                                                                                           1/71
  Verifying        : libtirpc-1.3.3-9.el9.x86_64                                                                                                                                                                                        2/71
  Verifying        : python3-setools-4.4.4-1.el9.x86_64                                                                                                                                                                                 3/71
  Verifying        : python3-setuptools-53.0.0-13.el9.noarch                                                                                                                                                                            4/71
  Verifying        : checkpolicy-3.6-1.el9.x86_64                                                                                                                                                                                       5/71
  Verifying        : mecab-0.996-3.el9.4.x86_64                                                                                                                                                                                         6/71
  Verifying        : mysql-errmsg-8.0.41-2.el9_5.x86_64                                                                                                                                                                                 7/71
  Verifying        : mysql-selinux-1.0.13-1.el9_5.noarch                                                                                                                                                                                8/71
  Verifying        : mysql-server-8.0.41-2.el9_5.x86_64                                                                                                                                                                                 9/71
  Verifying        : perl-AutoLoader-5.74-481.el9.noarch                                                                                                                                                                               10/71
  Verifying        : perl-B-1.80-481.el9.x86_64                                                                                                                                                                                        11/71
  Verifying        : perl-Carp-1.50-460.el9.noarch                                                                                                                                                                                     12/71
  Verifying        : perl-Class-Struct-0.66-481.el9.noarch                                                                                                                                                                             13/71
  Verifying        : perl-Data-Dumper-2.174-462.el9.x86_64                                                                                                                                                                             14/71
  Verifying        : perl-Digest-1.19-4.el9.noarch                                                                                                                                                                                     15/71
  Verifying        : perl-Digest-MD5-2.58-4.el9.x86_64                                                                                                                                                                                 16/71
  Verifying        : perl-Encode-4:3.08-462.el9.x86_64                                                                                                                                                                                 17/71
  Verifying        : perl-Errno-1.30-481.el9.x86_64                                                                                                                                                                                    18/71
  Verifying        : perl-Exporter-5.74-461.el9.noarch                                                                                                                                                                                 19/71
  Verifying        : perl-Fcntl-1.13-481.el9.x86_64                                                                                                                                                                                    20/71
  Verifying        : perl-File-Basename-2.85-481.el9.noarch                                                                                                                                                                            21/71
  Verifying        : perl-File-Path-2.18-4.el9.noarch                                                                                                                                                                                  22/71
  Verifying        : perl-File-Temp-1:0.231.100-4.el9.noarch                                                                                                                                                                           23/71
  Verifying        : perl-File-stat-1.09-481.el9.noarch                                                                                                                                                                                24/71
  Verifying        : perl-FileHandle-2.03-481.el9.noarch                                                                                                                                                                               25/71
  Verifying        : perl-Getopt-Long-1:2.52-4.el9.noarch                                                                                                                                                                              26/71
  Verifying        : perl-Getopt-Std-1.12-481.el9.noarch                                                                                                                                                                               27/71
  Verifying        : perl-HTTP-Tiny-0.076-462.el9.noarch                                                                                                                                                                               28/71
  Verifying        : perl-IO-1.43-481.el9.x86_64                                                                                                                                                                                       29/71
  Verifying        : perl-IO-Socket-IP-0.41-5.el9.noarch                                                                                                                                                                               30/71
  Verifying        : perl-IO-Socket-SSL-2.073-2.el9.noarch                                                                                                                                                                             31/71
  Verifying        : perl-IPC-Open3-1.21-481.el9.noarch                                                                                                                                                                                32/71
  Verifying        : perl-MIME-Base64-3.16-4.el9.x86_64                                                                                                                                                                                33/71
  Verifying        : perl-Mozilla-CA-20200520-6.el9.noarch                                                                                                                                                                             34/71
  Verifying        : perl-Net-SSLeay-1.94-1.el9.x86_64                                                                                                                                                                                 35/71
  Verifying        : perl-POSIX-1.94-481.el9.x86_64                                                                                                                                                                                    36/71
  Verifying        : perl-PathTools-3.78-461.el9.x86_64                                                                                                                                                                                37/71
  Verifying        : perl-Pod-Escapes-1:1.07-460.el9.noarch                                                                                                                                                                            38/71
  Verifying        : perl-Pod-Perldoc-3.28.01-461.el9.noarch                                                                                                                                                                           39/71
  Verifying        : perl-Pod-Simple-1:3.42-4.el9.noarch                                                                                                                                                                               40/71
  Verifying        : perl-Pod-Usage-4:2.01-4.el9.noarch                                                                                                                                                                                41/71
  Verifying        : perl-Scalar-List-Utils-4:1.56-462.el9.x86_64                                                                                                                                                                      42/71
  Verifying        : perl-SelectSaver-1.02-481.el9.noarch                                                                                                                                                                              43/71
  Verifying        : perl-Socket-4:2.031-4.el9.x86_64                                                                                                                                                                                  44/71
  Verifying        : perl-Storable-1:3.21-460.el9.x86_64                                                                                                                                                                               45/71
  Verifying        : perl-Symbol-1.08-481.el9.noarch                                                                                                                                                                                   46/71
  Verifying        : perl-Term-ANSIColor-5.01-461.el9.noarch                                                                                                                                                                           47/71
  Verifying        : perl-Term-Cap-1.17-460.el9.noarch                                                                                                                                                                                 48/71
  Verifying        : perl-Text-ParseWords-3.30-460.el9.noarch                                                                                                                                                                          49/71
  Verifying        : perl-Text-Tabs+Wrap-2013.0523-460.el9.noarch                                                                                                                                                                      50/71
  Verifying        : perl-Time-Local-2:1.300-7.el9.noarch                                                                                                                                                                              51/71
  Verifying        : perl-URI-5.09-3.el9.noarch                                                                                                                                                                                        52/71
  Verifying        : perl-base-2.27-481.el9.noarch                                                                                                                                                                                     53/71
  Verifying        : perl-constant-1.33-461.el9.noarch                                                                                                                                                                                 54/71
  Verifying        : perl-if-0.60.800-481.el9.noarch                                                                                                                                                                                   55/71
  Verifying        : perl-interpreter-4:5.32.1-481.el9.x86_64                                                                                                                                                                          56/71
  Verifying        : perl-libnet-3.13-4.el9.noarch                                                                                                                                                                                     57/71
  Verifying        : perl-libs-4:5.32.1-481.el9.x86_64                                                                                                                                                                                 58/71
  Verifying        : perl-mro-1.23-481.el9.x86_64                                                                                                                                                                                      59/71
  Verifying        : perl-overload-1.31-481.el9.noarch                                                                                                                                                                                 60/71
  Verifying        : perl-overloading-0.02-481.el9.noarch                                                                                                                                                                              61/71
  Verifying        : perl-parent-1:0.238-460.el9.noarch                                                                                                                                                                                62/71
  Verifying        : perl-podlators-1:4.14-460.el9.noarch                                                                                                                                                                              63/71
  Verifying        : perl-subs-1.03-481.el9.noarch                                                                                                                                                                                     64/71
  Verifying        : perl-vars-1.05-481.el9.noarch                                                                                                                                                                                     65/71
  Verifying        : policycoreutils-python-utils-3.6-2.1.el9.noarch                                                                                                                                                                   66/71
  Verifying        : protobuf-lite-3.14.0-16.el9.x86_64                                                                                                                                                                                67/71
  Verifying        : python3-audit-3.1.5-4.0.1.el9.x86_64                                                                                                                                                                              68/71
  Verifying        : python3-distro-1.5.0-7.el9.noarch                                                                                                                                                                                 69/71
  Verifying        : python3-libsemanage-3.6-5.el9_6.x86_64                                                                                                                                                                            70/71
  Verifying        : python3-policycoreutils-3.6-2.1.el9.noarch                                                                                                                                                                        71/71

Installed:
  checkpolicy-3.6-1.el9.x86_64               libicu-67.1-9.el9.x86_64                    libtirpc-1.3.3-9.el9.x86_64                     mecab-0.996-3.el9.4.x86_64                         mysql-errmsg-8.0.41-2.el9_5.x86_64
  mysql-selinux-1.0.13-1.el9_5.noarch        mysql-server-8.0.41-2.el9_5.x86_64          perl-AutoLoader-5.74-481.el9.noarch             perl-B-1.80-481.el9.x86_64                         perl-Carp-1.50-460.el9.noarch
  perl-Class-Struct-0.66-481.el9.noarch      perl-Data-Dumper-2.174-462.el9.x86_64       perl-Digest-1.19-4.el9.noarch                   perl-Digest-MD5-2.58-4.el9.x86_64                  perl-Encode-4:3.08-462.el9.x86_64
  perl-Errno-1.30-481.el9.x86_64             perl-Exporter-5.74-461.el9.noarch           perl-Fcntl-1.13-481.el9.x86_64                  perl-File-Basename-2.85-481.el9.noarch             perl-File-Path-2.18-4.el9.noarch
  perl-File-Temp-1:0.231.100-4.el9.noarch    perl-File-stat-1.09-481.el9.noarch          perl-FileHandle-2.03-481.el9.noarch             perl-Getopt-Long-1:2.52-4.el9.noarch               perl-Getopt-Std-1.12-481.el9.noarch
  perl-HTTP-Tiny-0.076-462.el9.noarch        perl-IO-1.43-481.el9.x86_64                 perl-IO-Socket-IP-0.41-5.el9.noarch             perl-IO-Socket-SSL-2.073-2.el9.noarch              perl-IPC-Open3-1.21-481.el9.noarch
  perl-MIME-Base64-3.16-4.el9.x86_64         perl-Mozilla-CA-20200520-6.el9.noarch       perl-Net-SSLeay-1.94-1.el9.x86_64               perl-POSIX-1.94-481.el9.x86_64                     perl-PathTools-3.78-461.el9.x86_64
  perl-Pod-Escapes-1:1.07-460.el9.noarch     perl-Pod-Perldoc-3.28.01-461.el9.noarch     perl-Pod-Simple-1:3.42-4.el9.noarch             perl-Pod-Usage-4:2.01-4.el9.noarch                 perl-Scalar-List-Utils-4:1.56-462.el9.x86_64
  perl-SelectSaver-1.02-481.el9.noarch       perl-Socket-4:2.031-4.el9.x86_64            perl-Storable-1:3.21-460.el9.x86_64             perl-Symbol-1.08-481.el9.noarch                    perl-Term-ANSIColor-5.01-461.el9.noarch
  perl-Term-Cap-1.17-460.el9.noarch          perl-Text-ParseWords-3.30-460.el9.noarch    perl-Text-Tabs+Wrap-2013.0523-460.el9.noarch    perl-Time-Local-2:1.300-7.el9.noarch               perl-URI-5.09-3.el9.noarch
  perl-base-2.27-481.el9.noarch              perl-constant-1.33-461.el9.noarch           perl-if-0.60.800-481.el9.noarch                 perl-interpreter-4:5.32.1-481.el9.x86_64           perl-libnet-3.13-4.el9.noarch
  perl-libs-4:5.32.1-481.el9.x86_64          perl-mro-1.23-481.el9.x86_64                perl-overload-1.31-481.el9.noarch               perl-overloading-0.02-481.el9.noarch               perl-parent-1:0.238-460.el9.noarch
  perl-podlators-1:4.14-460.el9.noarch       perl-subs-1.03-481.el9.noarch               perl-vars-1.05-481.el9.noarch                   policycoreutils-python-utils-3.6-2.1.el9.noarch    protobuf-lite-3.14.0-16.el9.x86_64
  python3-audit-3.1.5-4.0.1.el9.x86_64       python3-distro-1.5.0-7.el9.noarch           python3-libsemanage-3.6-5.el9_6.x86_64          python3-policycoreutils-3.6-2.1.el9.noarch         python3-setools-4.4.4-1.el9.x86_64
  python3-setuptools-53.0.0-13.el9.noarch

Complete!
[root@mysql01 ~]#

Passo 3 – Iniciar e habilitar o serviço.

[root@mysql01 ~]#
[root@mysql01 ~]# systemctl status mysqld
 mysqld.service - MySQL 8.0 database server
     Loaded: loaded (/usr/lib/systemd/system/mysqld.service; disabled; preset: disabled)
     Active: inactive (dead)
[root@mysql01 ~]#
[root@mysql01 ~]# systemctl enable mysqld
Created symlink /etc/systemd/system/multi-user.target.wants/mysqld.service  /usr/lib/systemd/system/mysqld.service.
[root@mysql01 ~]#
[root@mysql01 ~]# systemctl start mysqld
[root@mysql01 ~]#
[root@mysql01 ~]# systemctl status mysqld
● mysqld.service - MySQL 8.0 database server
     Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; preset: disabled)
     Active: active (running) since Fri 2025-06-13 17:00:23 -03; 1s ago
    Process: 38135 ExecStartPre=/usr/libexec/mysql-check-socket (code=exited, status=0/SUCCESS)
    Process: 38157 ExecStartPre=/usr/libexec/mysql-prepare-db-dir mysqld.service (code=exited, status=0/SUCCESS)
   Main PID: 38232 (mysqld)
     Status: "Server is operational"
      Tasks: 38 (limit: 9399)
     Memory: 449.0M
        CPU: 2.576s
     CGroup: /system.slice/mysqld.service
             └─38232 /usr/libexec/mysqld --basedir=/usr

Jun 13 17:00:15 mysql01 systemd[1]: Starting MySQL 8.0 database server...
Jun 13 17:00:15 mysql01 mysql-prepare-db-dir[38157]: Initializing MySQL database
Jun 13 17:00:23 mysql01 systemd[1]: Started MySQL 8.0 database server.
[root@mysql01 ~]#
[root@mysql01 ~]#


Passo 4 - Acessando com root sem senha.

[root@mysql01 ~]# mysql -u root
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 8.0.41 Source distribution

Copyright (c) 2000, 2025, Oracle and/or its affiliates.

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>

Passo 5 - Executando o script de segurança.
  • Defina nova senha para o root

  • Remova usuários anônimos

  • Desative acesso root remoto

  • Remova banco de testes

  • Atualize as permissões

[root@mysql01 ~]#
[root@mysql01 ~]# mysql_secure_installation

Securing the MySQL server deployment.

Enter password for user root:

VALIDATE PASSWORD COMPONENT can be used to test passwords
and improve security. It checks the strength of password
and allows the users to set only those passwords which are
secure enough. Would you like to setup VALIDATE PASSWORD component?

Press y|Y for Yes, any other key for No: Y

There are three levels of password validation policy:

LOW    Length >= 8
MEDIUM Length >= 8, numeric, mixed case, and special characters
STRONG Length >= 8, numeric, mixed case, special characters and dictionary                  file

Please enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: 2
Using existing password for root.

Estimated strength of the password: 50
Change the password for root ? ((Press y|Y for Yes, any other key for No) : Y

New password:

Re-enter new password:

Estimated strength of the password: 100
Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : Y
By default, a MySQL installation has an anonymous user,
allowing anyone to log into MySQL without having to have
a user account created for them. This is intended only for
testing, and to make the installation go a bit smoother.
You should remove them before moving into a production
environment.

Remove anonymous users? (Press y|Y for Yes, any other key for No) : Y
Success.


Normally, root should only be allowed to connect from
'localhost'. This ensures that someone cannot guess at
the root password from the network.

Disallow root login remotely? (Press y|Y for Yes, any other key for No) : Y
Success.

By default, MySQL comes with a database named 'test' that
anyone can access. This is also intended only for testing,
and should be removed before moving into a production
environment.


Remove test database and access to it? (Press y|Y for Yes, any other key for No) : Y
 - Dropping test database...
Success.

 - Removing privileges on test database...
Success.

Reloading the privilege tables will ensure that all changes
made so far will take effect immediately.

Reload privilege tables now? (Press y|Y for Yes, any other key for No) : Y
Success.

All done!
[root@mysql01 ~]#

Passo 5 – Acessando o MySQL.

[root@mysql01 ~]#
[root@mysql01 ~]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 17
Server version: 8.0.41 Source distribution

Copyright (c) 2000, 2025, Oracle and/or its affiliates.

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> select 1;
+---+
| 1 |
+---+
| 1 |
+---+
1 row in set (0.00 sec)

mysql>

Pronto! O MySQL está instalado e pronto para uso. 
Essa é uma excelente opção para quem quer estudar SQL, testar aplicações ou validar conectividade entre sistemas.

Comentários