GRANT ALL ON yourdatabasename.* TO root@'%' IDENTIFIED BY
'yourRootPassword';
GRANT ALL ON database_name.* TO user_name@'ip_address' IDENTIFIED BY 'user_password';
GRANT ALL ON mydatabase.* TO myuser@'%' IDENTIFIED BY 'mypassword';
GRANT ALL ON *.* TO myuser@'%' IDENTIFIED BY 'mypassword';