MySQL - Read only privileges on a database for a user

GRANT SELECT ON MY-DATABASE.* TO 'USERNAME'@'localhost' IDENTIFIED BY 'MYPASSWORD';
FLUSH PRIVILEGES;


Use "*" instead if you want to refer to all databases. And use wildcard "%" instead of "localhost" for a public user.