Skip to content

Instantly share code, notes, and snippets.

@rafabarzotto
Created March 9, 2017 11:16
Show Gist options
  • Save rafabarzotto/87cd22796b0bcc01fbce6e50cad2f10f to your computer and use it in GitHub Desktop.
Save rafabarzotto/87cd22796b0bcc01fbce6e50cad2f10f to your computer and use it in GitHub Desktop.
MySQL External Access
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