Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've seen stuff on how to enable remote access, but never how to restrict it so that users cannot make any changes. I tried doing this:

mysql> create user 'dude'@'boingoboingo.local' IDENTIFIED BY '007'; Query OK, 0 rows affected (0.00 sec)

This user cannot access any databases remotely. What do I need to grant for read only.

share|improve this question
up vote 6 down vote accepted
mysql>grant select on *.* to 'dude'@'boingoboingo.local';

or only one database

mysql>grant select on DATABASE_NAME.* to 'dude'@'boingoboingo.local';
share|improve this answer
I keep getting access denied though I flushed privileges and changed 'boingoboingo.local' to '%' – Detritus Maximus Oct 16 '10 at 15:38
Try change '%' to 'localhost' to access unix local socket – bindbn Oct 16 '10 at 15:48
@Flostsam: That's because you had password required checked you dummy! Thanks for the good answer bindbn! – Detritus Maximus Oct 16 '10 at 15:51

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.