Im learning PHP & MySQL from a book and the MySQL version its working with is 5.0.67 and im working with 5.1.41. Now to get straight to the point, im learning about REVOKE and GRANT and when i copy from the book the REVOKE isn't working. Maybe its because some of the syntax changed since then?
原帖地å€: TechSpott - Computer and technology forums http://www.techspott.com//showthread.php?p=7193
Im running this from Windows CMD prompt and yes im logged in as "root". Ill add a comment to the part that isnt working and will give the error.
mysql> GRANT ALL
-> ON *.*
-> TO fred IDENTIFIED BY 'abc'
-> WITH GRANT OPTION;
So i created a user and that works, i verified by:
mysql> SELECT * FROM mysql.user;
Here is where i get an error:
mysql> REVOKE ALL PRIVILEGES, GRANT
-> FROM fred;
"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 'FROM fred' at line 2"
I then tried this but got the SAME error as above:
mysql> REVOKE ALL PRIVILEGES
-> FROM fred;