MySQL - Read only privileges on a database for a user

Revision as of 17:08, 5 April 2020 by Ardaut (talk | changes)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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.