- Edit /etc/mysql/my.cnf;
#bind-address = 127.0.0.1
bind-address = 0.0.0.0
- Restart MySQL;
sudo service mysql restart
- Connect to MySQL;
mysql -u root -p mysql
- Execute the query
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
Thanks, Hugo!