Saturday, January 23, 2016

MySQL error on Grant: ERROR 1221 (HY000): Incorrect usage of DB GRANT and GLOBAL PRIVILEGES


When doing below grant:
mysql> GRANT SELECT, INSERT, UPDATE, DELETE, FILE ON ut_sipreg.* TO 'voip04my_sipreg'@'localhost' REQUIRE NONE WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0;

I received below error:
ERROR 1221 (HY000): Incorrect usage of DB GRANT and GLOBAL PRIVILEGES

To fix it, I had to take out "FILE" from permission list:
mysql> GRANT SELECT, INSERT, UPDATE, DELETE ON ut_sipreg.* TO 'voip04my_sipreg'@'localhost' REQUIRE NONE WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0;
Query OK, 0 rows affected (0.01 sec)

1 comment:

  1. But file is required in this case what will be alternate..

    ReplyDelete