Servidor Web com NGINX — Instalação do MariaDB em sistemas baseados em RHEL

Photo by Jan Antonin Kolar on Unsplash

Instalação

sudo dnf install mariadb-server

Habilitar Inicialização automática

sudo systemctl enable mariadb

Inicializar serviço

sudo systemctl start mariadb

Instalação de segurança

  • Definir uma senha para o usuário “root” do MariaDB;
  • Remover contas de usuários anônimos;
  • Desabilitar o login do usuário “root” fora do localhost;
  • Remover o banco de dados “teste”, que por padrão pode ser acessado por usuários anônimos.
sudo mysql_secure_installation
Enter current password for root (enter for none):
OK, successfully used password, moving on...
Switch to unix_socket authentication [Y/n]
Change the root password? [Y/n]
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
... Success!
Remove anonymous users? [Y/n]
... Success!
Disallow root login remotely? [Y/n]
... Success!
Remove test database and access to it? [Y/n]
- Dropping test database...
... Success!
- Removing privileges on test database...
... Success!
Reload privilege tables now? [Y/n]
... Success! Cleaning up... All done!  If you've completed all of the above steps, your MariaDB
installation should now be secure.
Thanks for using MariaDB!
mysql -u root -p
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 11
Server version: 5.5.5-10.5.13-MariaDB MariaDB Server
Copyright (c) 2000, 2021, 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.
quit

E pronto! O MariaDB já está instalado e devidamente configurado.

--

--

Desenvolvedor Front-end e UI/UX Designer.

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Marcelo Albuquerque

Marcelo Albuquerque

Desenvolvedor Front-end e UI/UX Designer.