Created
March 9, 2017 11:16
-
-
Save rafabarzotto/87cd22796b0bcc01fbce6e50cad2f10f to your computer and use it in GitHub Desktop.
MySQL External Access
This file contains 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
show variables like 'bind%'; | |
sudo nano /etc/mysql/my.cnf | |
bind-address = 0.0.0.0 | |
sudo /etc/init.d/mysql restart | |
mysql -uroot -p[senha] | |
mysql> GRANT ALL ON *.* TO 'root'@'%' IDENTIFIED BY '[senha]' WITH GRANT OPTION; | |
Caso queira conceder acesso a uma máquina específica da rede: | |
mysql> GRANT ALL ON *.* TO 'root'@'[ip da máquina]' IDENTIFIED BY '[senha]' WITH GRANT OPTION; | |
6. Execute o seguinte comando: | |
mysql> FLUSH PRIVILEGES; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment