2
votes

I issue the following command to allow root login from any host

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'xxxx' WITH GRANT OPTION;
FLUSH PRIVILEGES;

but it does not update?


mysql> show grants;
+----------------------------------------------------------------------------------------------------------------------------------------+
| Grants for root@localhost                                                                                                              |
+----------------------------------------------------------------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY PASSWORD '*xxxxxxxxxxxxxxxxx33487256' WITH GRANT OPTION |
| GRANT PROXY ON ''@'' TO 'root'@'localhost' WITH GRANT OPTION                                                                           |
+----------------------------------------------------------------------------------------------------------------------------------------+
2 rows in set (0.00 sec)

2

2 Answers

4
votes

I suspect it's because you're issuing the "show grants" command when connected as root to localhost. Try this and see what is returned:

SHOW GRANTS FOR 'root'@'%';

And if that doesn't show up anything, have a look in the mysql.user table, there might be a clue in there:

SELECT user, host FROM mysql.user;
0
votes

create user 'user'@'%' identified by 'pass'; Query OK, 0 rows affected (0.00 sec)

what i did was to add with grant option :) grant all on . to 'user'@'%' with grant option;

then it began to work it should be...

best regards, emrah benligil