Error
Error Code:
3628
MySQL Error 3628: Mandatory Role Cannot Be Modified
Description
This error occurs when an attempt is made to revoke or drop a role that has been designated as mandatory within the MySQL server configuration. Mandatory roles are critical for server operation or security and are protected from modification by default.
Error Message
The role %s is a mandatory role and can't be revoked or dropped. The restriction can be lifted by excluding the role identifier from the global variable mandatory_roles.
Known Causes
4 known causesRevoking a Mandatory Role
You attempted to remove privileges from or deactivate a role that is currently listed in the `mandatory_roles` global variable.
Dropping a Mandatory Role
You tried to permanently delete a role that is configured as essential via the `mandatory_roles` global variable.
Unawareness of Configuration
The user or script was not aware that the specific role was designated as mandatory in the MySQL server's `mandatory_roles` setting.
Automated Script Error
An administrative script or automated process attempted to modify a role, and the target role happened to be a mandatory one.
Solutions
Coming SoonGeneral Troubleshooting Tips
- Check the error message carefully for specific details
- Review recent changes that might have caused the error
- Search for the exact error code in the official documentation
- Check log files for additional context
- Try restarting the application or service