HowTo/MariaDB: mudanças entre as edições
< HowTo
(Criou página com '==Instalação== <syntaxhighlight lang="bash" style="border: 1px solid blue;"> sudo apt install mariadb-server </syntaxhighlight> ==Configuração== <syntaxhighlight lang="bash" style="border: 1px solid blue;"> sudo mysql_secure_installation </syntaxhighlight> * Acessar: <syntaxhighlight lang="bash" style="border: 1px solid blue;"> sudo mysql </syntaxhighlight> * Criar o: '''useradmin''' <syntaxhighlight lang="bash" style="border: 1px solid blue;"> CREATE USER 'useradmin...') |
Sem resumo de edição |
||
| (2 revisões intermediárias pelo mesmo usuário não estão sendo mostradas) | |||
| Linha 1: | Linha 1: | ||
{{SUBHEAD}} | |||
==Instalação== | ==Instalação== | ||
<syntaxhighlight lang="bash" style="border: 1px solid blue;"> | <syntaxhighlight lang="bash" style="border: 1px solid blue;"> | ||
| Linha 17: | Linha 18: | ||
FLUSH PRIVILEGES; | FLUSH PRIVILEGES; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
* Remover as linhas da criação do '''useradmin''' em: '''/root/.mysql_history''' | * Criar o: '''superadmin''' | ||
<syntaxhighlight lang="bash" style="border: 1px solid blue;"> | |||
CREATE USER 'superadmin'@'localhost' IDENTIFIED BY 'password'; | |||
GRANT SUPER ON *.* TO 'superadmin'@'localhost'; | |||
FLUSH PRIVILEGES; | |||
</syntaxhighlight> | |||
* Remover as linhas da criação do '''useradmin''' ou '''superadmin''' em: '''/root/.mysql_history''' | |||
* Instalar o phpMyAdmin: | * Instalar o phpMyAdmin: | ||
<syntaxhighlight lang="bash" style="border: 1px solid blue;"> | <syntaxhighlight lang="bash" style="border: 1px solid blue;"> | ||
sudo apt install phpmyadmin | sudo apt install phpmyadmin | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==Fontes== | |||
* [https://mariadb.com/kb/pt-br/mariadb-brazilian-portuguese/ MariaDB - Brazilian Portuguese] | |||
** [https://mariadb.com/docs/skysql-dbaas/ref/xpand/privileges/SUPER/ SUPER Privilege] | |||
** [https://cursos.alura.com.br/forum/topico-por-que-usar-with-grant-option-131963 Por que usar WITH GRANT OPTION?] | |||
Edição atual tal como às 20h33min de 1 de julho de 2024
MariaDB
Instalação
sudo apt install mariadb-serverConfiguração
sudo mysql_secure_installation- Acessar:
sudo mysql- Criar o: useradmin
CREATE USER 'useradmin'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'useradmin'@'localhost' WITH GRANT OPTION;
FLUSH PRIVILEGES;- Criar o: superadmin
CREATE USER 'superadmin'@'localhost' IDENTIFIED BY 'password';
GRANT SUPER ON *.* TO 'superadmin'@'localhost';
FLUSH PRIVILEGES;- Remover as linhas da criação do useradmin ou superadmin em: /root/.mysql_history
- Instalar o phpMyAdmin:
sudo apt install phpmyadmin