Commands:
- sudo nano /etc/mysql/my.cnf
- Look for
[mysqld]
andbind-address
- Edit the new address that matches your desired ip address (0.0.0.0 for all)
- sudo service mysql restart
- mysql –uremoteuser -premoteuserpassword
- GRANT ALL ON *.* TO remoteuser@’%’ IDENTIFIED BY ‘remoteuserpassword’;
- FLUSH PRIVILEGES;
Source: