Quote:
|
Originally Posted by Sleepingkirby
I'm sorry for such a simple question, but I've been trying for a week now to solve this and haven't been able to find a solution.
user: guestuser
database: db1
table: tb1
I've been trying to give guest user insert privileges to tb1 but not to the rest of the tables in db1. I've tried:
grant select on db1.tb1 to guestuser;
which works... until I reboot my machine. Then it says that user can't select db1. But if I give guestuser select privileges on db1 in the mysql database, then he has access to all tables in db1. Anyone has a solution? Thanks in advance.
|
::If you are trying to give INSERT privileges to a user you need to add INSERT to your GRANT.
try:
Code:
GRANT Insert ON db1.tb1 TO 'guestuser'@'%';
FLUSH PRIVILEGES;
or:
Code:
GRANT Select, Insert ON db1.tb1 TO 'guestuser'@'%';
FLUSH PRIVILEGES;
The 'FLUSH PRIVILEGES' at the end will tell the server to reset the privileges table and update with the new information. That might be the problem with it not saving.
Also, make sure that the user account that your using ( if not the root account ) has the rights to do so.