#Criar usuário
1 2 | CREATE USER 'site'@'%' IDENTIFIED BY 'site'; CREATE USER 'site'@'localhost' IDENTIFIED BY 'site'; |
#Liberar acesso
1 2 | GRANT ALL ON site.* TO 'site'@'%' IDENTIFIED BY 'site' WITH GRANT OPTION; GRANT ALL ON site.* TO 'site'@'localhost' IDENTIFIED BY 'site' WITH GRANT OPTION; |
#Trocar senha
1 | update mysql.user set password=PASSWORD('site') where user='site'; |
#Apagar usuário
1 | DROP USER 'site'@'%'; |
FLUSH PRIVILEGES;