The below snippet will create a MySQL user and grant them all permissions on the given database. The % wildcard identifier will allow this particular user to be accessible via any hostname. While the * wildcard will grant the user access to all tables within the supplied database. You can change either to match your specific needs.
GRANT ALL ON `database`.* TO 'user'@'%' IDENTIFIED BY 'password';
GRANT ALL ON `database`.`table` TO 'user'@'192.168.1.%' IDENTIFIED BY 'password';