How can give privilege for DB to a user [ ERROR 1044 (42000): Access denied for user ''@'localhost']
- by Ahn
I have created user in mysql 5.1 and given the ALL privilege, details given below,
mysql> show GRANTS FOR test;
+-------------------------------------------------------------+
| Grants for test@% |
+-------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'test'@'%' WITH GRANT OPTION |
| GRANT ALL PRIVILEGES ON `tt`.* TO 'test'@'%' |
+-------------------------------------------------------------+
2 rows in set (0.00 sec)
But the show databases is not showing the databases on the mysql. It only shows as given below. How can give privilege for other DB s tables as well for the user 'test'?
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| test |
+--------------------+
Error while I tried to use the mysql DB as user test:
mysql> use mysql;
ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'mysql'