I am aware of this command:
GRANT ALL PRIVILEGES ON database.* TO \'user\'@\'yourremotehost\' IDENTIFIED BY \'newpassword\';
But then it on
If you want to grant remote access of your database from any IP address, run the mysql command and after that run the following command.
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;