Last active
March 10, 2022 12:42
-
-
Save luizomf/f8ea8d537c5489f3483ca99e49cb4837 to your computer and use it in GitHub Desktop.
MySQL 8 vídeo commands https://youtu.be/Mv8Xx8zZ69A - Quer aprender a instalar e configurar o MySQL 8 no Ubuntu com explicações clara sobre cada passo da instalação? Bora lá então.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Criar chave ssh no computador local | |
ssh-keygen -t rsa -b 4096 -f ~/.ssh/novachave -C "luizotavio" | |
# Atualizando pacotes no servidor | |
sudo apt update | |
sudo apt upgrade | |
sudo apt install mysql-server mysql-client | |
sudo mysql_secure_installation | |
# Entrando no mysql | |
sudo mysql | |
# Comandos mysql | |
CREATE DATABASE basededados CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci; | |
CREATE USER 'usuario'@'localhost' IDENTIFIED BY 'ûÞuwU#ðmEzvù@ê _{B6 1ð'; | |
GRANT ALL PRIVILEGES ON basededados.* TO 'usuario'@'localhost'; | |
flush privileges | |
# Ver usuários | |
SELECT User,Host FROM mysql.user; | |
# Ver grants | |
SHOW GRANTS FOR 'usuario'@'%'; | |
# Remover grants | |
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'usuario'@'%'; | |
# Remover usuários | |
DROP USER 'usuario'@'%'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment