One More Possible Reason for ERROR 1959 (OP000) Invalid role specification

Mon, 2015-01-26 09:59chris.calender

I ran into this error today while working with ROLES, bundled privileges for a group of users (a nice addition in MariaDB 10.0):

ERROR 1959 (OP000) Invalid role specification

The manual suggests that this error occurs "if a role that doesn't exist, or to which the user has not been assigned, is specified".

However, I ran into a case where the role was created and assigned properly (examine SHOW GRANTS for user in question).

In this case, the problem was just due to a bug that affected remote connections on older versions.

Thus if you encounter this error, check if you're using a remote connection, and if so, this bug is your problem (assuming you created and assigned the role properly).

If interested in reading more about roles, please refer to:

https://mariadb.com/kb/en/mariadb/documentation/managing-mariadb/user-account-management/roles/

Hope this helps.

 

Tags: Howto About the Author Chris Calender

Chris Calender is a Principal Support Engineer with MariaDB. Earlier he was a Principal Support Engineer at MySQL/Sun/Oracle. And before that, he worked as a MySQL DBA and developer for numerous Fortune 500 Companies, including Clear Channel, Western & Southern, and Cincinnati Bell. Chris has both Bachelor's and Master's degrees in Computer Science, from Miami University and the University of Cincinnati, respectively.