这是对mysql 业务用户在权限处理中遇到的坑:

  之前在新建mysql 实例后会做两件事

  1、增加业务库

  2、为业务库增加一个与之对应的用户

create database appdb char set utf8;
create user app@'%' identified by 'app@1234';
grant all on appdb.* to app@'%';

 

可能存在的问题:

  1、如果实例开启了binlog 日志,业务用户在创建procedure的时候会报以下错误:

ERROR 1419 (HY000): You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)

  为了解决这面的问题有两个方案可以解决:

  a、设置log_bin_trust_function_creators为on

  b、给业务用户一个super权限,根据提示b解决方案会更好。

grant super on *.* to app@'%';

 

 

 

----

相关文章:

  • 2021-07-29
  • 2021-12-12
  • 2022-03-08
  • 2021-10-23
  • 2022-02-21
猜你喜欢
  • 2022-12-23
  • 2021-07-23
  • 2022-12-23
  • 2021-12-05
  • 2021-12-22
  • 2021-10-15
  • 2021-05-11
相关资源
相似解决方案