Description:
With the table detailed below I find I have to run the permissions script given twice befor the permissions are as expected. When I first try to use the database using the user 'UserCheck' from php I get
againAccess denied for user: 'UserCheck'@'localhost' to database 'dbname'
if I run the permissions script it then alows me to access the table but not update it with the following error
UPDATE command denied to user: 'UserCheck'@'localhost' for column 'LastLogin' in table 'users'
if I run the permissions script again it all works.
Both the table permissions table and the column permissions table are as expected after running the permissions script and after a reboot.
How to repeat:
I have a table which actually contains more than this but this will do.
create table Users
(
UserName varchar(20) not null,
LastLogin datetime,
);
I have a script that configures permissions on tables
REVOKE ALL PRIVILEGES, GRANT from "UserCheck"@"localhost";
GRANT USAGE ON *.* TO "UserCheck"@"localhost";
GRANT USAGE ON `dbname`.* TO "UserCheck"@"localhost";
GRANT SELECT, UPDATE (`LastLogin`) ON `dbname`.`users` TO "UserCheck"@"localhost";