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

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.