I am aware of this command:
GRANT ALL PRIVILEGES ON database.* TO \'user\'@\'yourremotehost\' IDENTIFIED BY \'newpassword\';
But then it on
Just create the user to some database like
GRANT ALL PRIVILEGES ON .* TO ''@'%' IDENTIFIED BY ''
Then go to
sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf and change the line bind-address = 127.0.0.1 to bind-address = 0.0.0.0
sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf
bind-address = 127.0.0.1
bind-address = 0.0.0.0
After that you may connect to that database from any IP.