Comments - SET ROLE
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.
Another possible reason for the "ERROR 1959 (OP000): Invalid role specification" error, if you are running MariaDB pre-10.0.13 is this bug:
https://mariadb.atlassian.net/browse/MDEV-6401
It affects remote connections attempting to issue the SET ROLES command. The bug is fixed in 10.0.13+.