新安装的mysql 5.7 导入存储过程的时候,出现 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)
我想了一下,新安装的mysql 使用sudo service mysql start
使用root用户,不是mysql用户,由于mysql的安全机制,不允许运行存储过程
mysql> SHOW VARIABLES LIKE 'log_bin_trust_function_creators';
+---------------------------------+-------+
| Variable_name | Value |
+---------------------------------+-------+
| log_bin_trust_function_creators | OFF |
临时解决
set global log_bin_trust_function_creators=1;
mysql> SHOW VARIABLES LIKE 'log_bin_trust_function_creators';
+---------------------------------+-------+
| Variable_name | Value |
+---------------------------------+-------+
| log_bin_trust_function_creators | ON |
+---------------------------------+-------+
永久解决 编辑 /etc/my.cnf
添加
log-bin-trust-function-creators = 1
阅读(3482) | 评论(0) | 转发(0) |