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 followed 78246
When I do

mysql> GRANT ALL PRIVILEGES ON *.* for 'root'@'%' IDENTIFIED BY 'password';  
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'for 'root'@'%' IDENTIFIED BY 'password'' at line 1

How do I make it work ?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

It should be to, not for.

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password'; 
share|improve this answer
    
+1, I hate when I've got an answer typed in and I get the "Load new answers?" box right as I'm about to post. –  Chris S Jul 8 '10 at 12:47
    
I thought someone was going to beat me to answering this one :) –  theotherreceive Jul 8 '10 at 12:49

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.