Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

MySql 5.1.48 GRANT problems

 
Mary Taylor
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you log out and back in as the user you created?
 
Mary Taylor
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 51450
87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might get more attention on our JDBC forum, so I shall move you there.
 
Mary Taylor
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I see I was trying to access a table the user did not have permission to access. Sorry to have not seen this earlier.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic