Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

1 Answer 1

up vote 4 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
add comment

Your Answer

 
discard

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.