| Author |
MySql 5.1.48 GRANT problems
|
Mary Taylor
Ranch Hand
Joined: Sep 11, 2000
Posts: 313
|
|
I have followed instructions carefully in several tutorials and still am not successful granting permissions to a user in MySql.
mysql> GRANT ALL on resourceProject.* TO 'resourceUser'@'localhost' IDENTIFIED BY 'resourceUserPassword';
Query OK, 0 rows affected (0.02 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
mysql> SELECT host, user, password, Select_priv FROM mysql.user;
+-----------+----------------+----------------------------------------------------------------+-------------+
| host | user | password | Select_priv |
+-----------+----------------+----------------------------------------------------------------+-------------+
| localhost | root | root Password | Y |
| localhost | resourceUser | *04087AC6924F981A8A38B40241452B1358A39E3D | N |
+-----------+----------------+----------------------------------------------------------------+-------------+
2 rows in set (0.00 sec)
mysql> select user();
+----------------+
| user() |
+----------------+
| root@localhost |
+----------------+
1 row in set (0.00 sec)
What am I missing? Thank you for taking the time to respond.
|
 |
Peter Johnson
author
Bartender
Joined: May 14, 2008
Posts: 4875
|
posted

0
|
|
Did you log out and back in as the user you created?
|
JBoss In Action
|
 |
Mary Taylor
Ranch Hand
Joined: Sep 11, 2000
Posts: 313
|
|
I did log out and back in as the user I created; however, I can do nothing as that user.
mysql> select user();
+------------------------+
| user() |
+------------------------+
| resourceUser@localhost |
+------------------------+
1 row in set (0.00 sec)
mysql> SELECT host, user, password, Select_priv FROM mysql.user;
ERROR 1142 (42000): SELECT command denied to user 'resourceUser'@'localhost' for table 'user'
mysql>
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 26720
|
|
|
You might get more attention on our JDBC forum, so I shall move you there.
|
 |
Mary Taylor
Ranch Hand
Joined: Sep 11, 2000
Posts: 313
|
|
|
I see I was trying to access a table the user did not have permission to access. Sorry to have not seen this earlier.
|
 |
 |
|
|
subject: MySql 5.1.48 GRANT problems
|
|
|