Im reading O'Relly "Learning MySQL" and it says that you can create a user in MySQL by doing just this:
mysql> GRANT ALL ON *.* TO 'jill'@'%.invyhome.com' IDENTIFIED BY 'the_password'; Query OK, 0 rows affected (0.01 sec)
But if I try to do:
-> grant select on testgrounds.personas to ''@'localhost'; --> Error Code: 1133. Can't find any matching row in the user table
But it succeds if I use a password:
->grant select on testgrounds.personas to ''@'localhost' identified by 'pass'; --> 0 row(s) affected
I had to restore the privileges for user root because i was experimenting and i messed them up, so i think before doing that i could actually use the statement in the book (i dont remember 100%)
-> select current_user; --> 'root@localhost' -> show grants; --> 'GRANT ALL PRIVILEGES ON *.* TO \'root\'@\'localhost\' IDENTIFIED BY PASSWORD \'*4ACFE3202A5FF5CF467898FC58AAB1D615029441\' WITH GRANT OPTION' --> 'GRANT ALL PRIVILEGES ON `testgrounds`.* TO \'root\'@\'localhost\' WITH GRANT OPTION' --> 'GRANT PROXY ON \'\'@\'\' TO \'root\'@\'localhost\' WITH GRANT OPTION'
Is there something wrong with my MySQL installation or set-up?