我的编程空间,编程开发者的网络收藏夹
学习永远不晚

MySQL Error number: 3897; Symbol: ER_CANNOT_GRANT_SYSTEM_PRIV_TO_MANDATORY_ROLE; SQLSTATE: HY000 报错

短信预约 -IT技能 免费直播动态提醒
省份

北京

  • 北京
  • 上海
  • 天津
  • 重庆
  • 河北
  • 山东
  • 辽宁
  • 黑龙江
  • 吉林
  • 甘肃
  • 青海
  • 河南
  • 江苏
  • 湖北
  • 湖南
  • 江西
  • 浙江
  • 广东
  • 云南
  • 福建
  • 海南
  • 山西
  • 四川
  • 陕西
  • 贵州
  • 安徽
  • 广西
  • 内蒙
  • 西藏
  • 新疆
  • 宁夏
  • 兵团
手机号立即预约

请填写图片验证码后获取短信验证码

看不清楚,换张图片

免费获取短信验证码

MySQL Error number: 3897; Symbol: ER_CANNOT_GRANT_SYSTEM_PRIV_TO_MANDATORY_ROLE; SQLSTATE: HY000  报错

文档解释

Error number: 3897; Symbol: ER_CANNOT_GRANT_SYSTEM_PRIV_TO_MANDATORY_ROLE; SQLSTATE: HY000

Message: AuthId `%s`@`%s` is set as mandatory_roles. Cannot grant the ‘%s’ privilege.

错误说明:

MySQL的ER_CANNOT_GRANT_SYSTEM_PRIV_TO_MANDATORY_ROLE错误表示,不能将系统特权授予交互角色(mandatory role)。该错误是由系统发出的,当MySQL试图为一个特定的角色授予的系统特权级别的权限时,会禁止此类操作。该错误由MySQL 5.7支持。

常见案例

ER_CANNOT_GRANT_SYSTEM_PRIV_TO_MANDATORY_ROLE错误通常会在MySQL中尝试将系统特权授予Insert_Test角色时发生。例如,MySQL试图在下面的语句中授予INSERT_TEST角色sys_priv:

GRANT SYS_PRIV ON *.* TO INSERT_TEST;

此外,此错误还可能发生在尝试授予某些系统特权时,诸如EXECUTE或ALTER。

解决办法:

首先,在尝试授予系统特权时,您应该确保用户是普通用户,而不是必须角色。如果您只是想要授予系统特权,只需将其分配给INSERT_TEST帐户而不是INSERT_TEST角色即可。

例如:

GRANT SYS_PRIV TO INSERT_TEST@hostname;

其次,您可以尝试删除INSERT_TEST“mandatory_role_statement”,当检测到未满足条件分配时,系统将执行此类操作。

关于MySQL的此错误的其他解决方法的更多问题,您可以查看MySQL 5.7文档中的ER_CANNOT_GRANT_SYSTEM_PRIV_TO_MANDATORY_ROLE部分,了解更多细节。

免责声明:

① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。

② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341

MySQL Error number: 3897; Symbol: ER_CANNOT_GRANT_SYSTEM_PRIV_TO_MANDATORY_ROLE; SQLSTATE: HY000 报错

下载Word文档到电脑,方便收藏和打印~

下载Word文档

猜你喜欢

MySQL Error number: 3897; Symbol: ER_CANNOT_GRANT_SYSTEM_PRIV_TO_MANDATORY_ROLE; SQLSTATE: HY000 报错

文档解释Error number: 3897; Symbol: ER_CANNOT_GRANT_SYSTEM_PRIV_TO_MANDATORY_ROLE; SQLSTATE: HY000Message: AuthId `%s`@`%s`
MySQL Error number: 3897; Symbol: ER_CANNOT_GRANT_SYSTEM_PRIV_TO_MANDATORY_ROLE; SQLSTATE: HY000  报错
2023-11-05

MySQL Error number: 3794; Symbol: ER_RPL_ENCRYPTION_MASTER_KEY_RECOVERY_FAILED; SQLSTATE: HY000 报错

文档解释Error number: 3794; Symbol: ER_RPL_ENCRYPTION_MASTER_KEY_RECOVERY_FAILED; SQLSTATE: HY000Message: Unable to recover
MySQL Error number: 3794; Symbol: ER_RPL_ENCRYPTION_MASTER_KEY_RECOVERY_FAILED; SQLSTATE: HY000  报错
2023-11-05

MySQL Error number: 3952; Symbol: ER_DA_UDF_INVALID_RETURN_TYPE_TO_SET_CHARSET; SQLSTATE: HY000 报错

文档解释Error number: 3952; Symbol: ER_DA_UDF_INVALID_RETURN_TYPE_TO_SET_CHARSET; SQLSTATE: HY000Message: Character set can
MySQL Error number: 3952; Symbol: ER_DA_UDF_INVALID_RETURN_TYPE_TO_SET_CHARSET; SQLSTATE: HY000  报错
2023-11-05

MySQL Error number: 4093; Symbol: ER_INNODB_INSTANT_ADD_NOT_SUPPORTED_MAX_SIZE; SQLSTATE: HY000 报错

文档解释Error number: 4093; Symbol: ER_INNODB_INSTANT_ADD_NOT_SUPPORTED_MAX_SIZE; SQLSTATE: HY000Message: Column cant be
MySQL Error number: 4093; Symbol: ER_INNODB_INSTANT_ADD_NOT_SUPPORTED_MAX_SIZE; SQLSTATE: HY000  报错
2023-11-05

MySQL Error number: 3942; Symbol: ER_TABLE_VALUE_CONSTRUCTOR_MUST_HAVE_COLUMNS; SQLSTATE: HY000 报错

文档解释Error number: 3942; Symbol: ER_TABLE_VALUE_CONSTRUCTOR_MUST_HAVE_COLUMNS; SQLSTATE: HY000Message: Each row of a
MySQL Error number: 3942; Symbol: ER_TABLE_VALUE_CONSTRUCTOR_MUST_HAVE_COLUMNS; SQLSTATE: HY000  报错
2023-11-05

MySQL Error number: 3941; Symbol: ER_ALTER_CONSTRAINT_ENFORCEMENT_NOT_SUPPORTED; SQLSTATE: HY000 报错

文档解释Error number: 3941; Symbol: ER_ALTER_CONSTRAINT_ENFORCEMENT_NOT_SUPPORTED; SQLSTATE: HY000Message: Altering
MySQL Error number: 3941; Symbol: ER_ALTER_CONSTRAINT_ENFORCEMENT_NOT_SUPPORTED; SQLSTATE: HY000  报错
2023-11-05

MySQL Error number: 3729; Symbol: ER_INDEX_TYPE_NOT_SUPPORTED_FOR_SPATIAL_INDEX; SQLSTATE: HY000 报错

文档解释Error number: 3729; Symbol: ER_INDEX_TYPE_NOT_SUPPORTED_FOR_SPATIAL_INDEX; SQLSTATE: HY000Message: The index type
MySQL Error number: 3729; Symbol: ER_INDEX_TYPE_NOT_SUPPORTED_FOR_SPATIAL_INDEX; SQLSTATE: HY000  报错
2023-11-05

MySQL Error number: 3800; Symbol: ER_FUNCTIONAL_INDEX_ROW_VALUE_IS_NOT_ALLOWED; SQLSTATE: HY000 报错

文档解释Error number: 3800; Symbol: ER_FUNCTIONAL_INDEX_ROW_VALUE_IS_NOT_ALLOWED; SQLSTATE: HY000Message: Expression of
MySQL Error number: 3800; Symbol: ER_FUNCTIONAL_INDEX_ROW_VALUE_IS_NOT_ALLOWED; SQLSTATE: HY000  报错
2023-11-05

MySQL Error number: 3178; Symbol: ER_UNSUPPORTED_ALTER_ONLINE_ON_VIRTUAL_COLUMN; SQLSTATE: HY000 报错

文档解释Error number: 3178; Symbol: ER_UNSUPPORTED_ALTER_ONLINE_ON_VIRTUAL_COLUMN; SQLSTATE: HY000Message: ADD COLUMN
MySQL Error number: 3178; Symbol: ER_UNSUPPORTED_ALTER_ONLINE_ON_VIRTUAL_COLUMN; SQLSTATE: HY000  报错
2023-11-04

MySQL Error number: 3546; Symbol: ER_CANT_SET_GTID_PURGED_DUE_SETS_CONSTRAINTS; SQLSTATE: HY000 报错

文档解释Error number: 3546; Symbol: ER_CANT_SET_GTID_PURGED_DUE_SETS_CONSTRAINTS; SQLSTATE: HY000Message:
MySQL Error number: 3546; Symbol: ER_CANT_SET_GTID_PURGED_DUE_SETS_CONSTRAINTS; SQLSTATE: HY000  报错
2023-11-05

MySQL Error number: 3574; Symbol: ER_CTE_RECURSIVE_REQUIRES_NONRECURSIVE_FIRST; SQLSTATE: HY000 报错

文档解释Error number: 3574; Symbol: ER_CTE_RECURSIVE_REQUIRES_NONRECURSIVE_FIRST; SQLSTATE: HY000Message: Recursive Common
MySQL Error number: 3574; Symbol: ER_CTE_RECURSIVE_REQUIRES_NONRECURSIVE_FIRST; SQLSTATE: HY000  报错
2023-11-04

MySQL Error number: 3112; Symbol: ER_CANT_USE_AUTO_POSITION_WITH_GTID_MODE_OFF; SQLSTATE: HY000 报错

文档解释Error number: 3112; Symbol: ER_CANT_USE_AUTO_POSITION_WITH_GTID_MODE_OFF; SQLSTATE: HY000Message: The replication
MySQL Error number: 3112; Symbol: ER_CANT_USE_AUTO_POSITION_WITH_GTID_MODE_OFF; SQLSTATE: HY000  报错
2023-11-04

MySQL Error number: 4020; Symbol: ER_ANONYMOUS_TO_GTID_UUID_SAME_AS_GROUP_NAME; SQLSTATE: HY000 报错

文档解释Error number: 4020; Symbol: ER_ANONYMOUS_TO_GTID_UUID_SAME_AS_GROUP_NAME; SQLSTATE: HY000Message: Replication %s
MySQL Error number: 4020; Symbol: ER_ANONYMOUS_TO_GTID_UUID_SAME_AS_GROUP_NAME; SQLSTATE: HY000  报错
2023-11-05

MySQL Error number: 3839; Symbol: ER_INNODB_REDO_LOG_ARCHIVE_START_SUBDIR_PATH; SQLSTATE: HY000 报错

文档解释Error number: 3839; Symbol: ER_INNODB_REDO_LOG_ARCHIVE_START_SUBDIR_PATH; SQLSTATE: HY000Message: Redo log
MySQL Error number: 3839; Symbol: ER_INNODB_REDO_LOG_ARCHIVE_START_SUBDIR_PATH; SQLSTATE: HY000  报错
2023-11-05

MySQL Error number: 4042; Symbol: ER_WARN_ADUIT_LOG_MAX_SIZE_AND_PRUNE_SECONDS; SQLSTATE: HY000 报错

文档解释Error number: 4042; Symbol: ER_WARN_ADUIT_LOG_MAX_SIZE_AND_PRUNE_SECONDS; SQLSTATE: HY000Message: Both
MySQL Error number: 4042; Symbol: ER_WARN_ADUIT_LOG_MAX_SIZE_AND_PRUNE_SECONDS; SQLSTATE: HY000  报错
2023-11-05

MySQL Error number: 3091; Symbol: ER_CANNOT_LOG_PARTIAL_DROP_DATABASE_WITH_GTID; SQLSTATE: HY000 报错

文档解释Error number: 3091; Symbol: ER_CANNOT_LOG_PARTIAL_DROP_DATABASE_WITH_GTID; SQLSTATE: HY000Message: DROP DATABASE
MySQL Error number: 3091; Symbol: ER_CANNOT_LOG_PARTIAL_DROP_DATABASE_WITH_GTID; SQLSTATE: HY000  报错
2023-11-05

MySQL Error number: 4030; Symbol: ER_WARN_ASYNC_CONN_FAILOVER_NETWORK_NAMESPACE; SQLSTATE: HY000 报错

文档解释Error number: 4030; Symbol: ER_WARN_ASYNC_CONN_FAILOVER_NETWORK_NAMESPACE; SQLSTATE: HY000Message: The parameter
MySQL Error number: 4030; Symbol: ER_WARN_ASYNC_CONN_FAILOVER_NETWORK_NAMESPACE; SQLSTATE: HY000  报错
2023-11-05

MySQL Error number: 4047; Symbol: ER_WARN_SQL_AFTER_MTS_GAPS_GAP_NOT_CALCULATED; SQLSTATE: HY000 报错

文档解释Error number: 4047; Symbol: ER_WARN_SQL_AFTER_MTS_GAPS_GAP_NOT_CALCULATED; SQLSTATE: HY000Message: The until clause
MySQL Error number: 4047; Symbol: ER_WARN_SQL_AFTER_MTS_GAPS_GAP_NOT_CALCULATED; SQLSTATE: HY000  报错
2023-11-05

MySQL Error number: 4041; Symbol: ER_GRP_RPL_VIEW_CHANGE_UUID_FAIL_GET_VARIABLE; SQLSTATE: HY000 报错

文档解释Error number: 4041; Symbol: ER_GRP_RPL_VIEW_CHANGE_UUID_FAIL_GET_VARIABLE; SQLSTATE: HY000Message: Unable to
MySQL Error number: 4041; Symbol: ER_GRP_RPL_VIEW_CHANGE_UUID_FAIL_GET_VARIABLE; SQLSTATE: HY000  报错
2023-11-04

MySQL Error number: 4112; Symbol: ER_CREATE_SELECT_WITH_GIPK_DISALLOWED_IN_SBR; SQLSTATE: HY000 报错

文档解释Error number: 4112; Symbol: ER_CREATE_SELECT_WITH_GIPK_DISALLOWED_IN_SBR; SQLSTATE: HY000Message: Generating an
MySQL Error number: 4112; Symbol: ER_CREATE_SELECT_WITH_GIPK_DISALLOWED_IN_SBR; SQLSTATE: HY000  报错
2023-11-05

编程热搜

目录