Comments - ERROR 1141 (42000): There is no such grant defined for user
Content reproduced on this site is the property of its respective owners,
and this content is not reviewed in advance by MariaDB. The views, information and opinions
expressed by this content do not necessarily represent those of MariaDB or any other party.
We have a role defined with one privilege. When we execute show grants for <role name>, we get the error described.
Please provide the statements, otherwise there's no information to go on.
mysql> show grants for myreader;
Note that there is a difference between, for example:
and
which returns grants.
Found the issue. There was a management perl script that was expecting a user-host combination, and the user was actually a role. We added a decision block to account for roles in the user table. Thanks for your assistance.
Hi, How did you created `myreader` and which mariadb version you are using, also what is the output of `select * from mysql.user`? Please provide as much information as needed to help us solve your problem.
The select from mysql.user works fine. It is the SHOW GRANTS that is having the issue. The version is 10.1.12. The role was created long ago. I am the new dba and noticed the backup scripts reporting errors when running mysql --batch --execute='show grants for $user;' So I tried the command on the command line and got the failure. Then I tried the command directly within the database and got the error.
And did you analyse what are privileges of your role/user?
Please paste here in comment output from
Also what are the privileges of your current user ? SHOW GRANTS FOR CURRENT_USER();