gpt4 book ai didi

mysql - 变量 'sql_mode'不能设置为 'NO_AUTO_CREATE_USER'的值

转载 作者:可可西里 更新时间:2023-11-01 06:28:02 28 4
gpt4 key购买 nike

我正在使用 MySQL Workbench 8.0。我正在尝试将测试数据转储到数据库,包括所有表、存储过程和带有数据的 View 。

当我尝试导入时,它说导入完成但有一个错误,错误是

Variable 'sql_mode' can't be set to the value of 'NO_AUTO_CREATE_USER' Operation failed with exitcode 1

同样在导入之后,如果我检查数据库,只有表来了,但根本没有存储过程。

如何解决这个问题?

最佳答案

在从 MySQL Workbench 6.1 CE 导出我的数据库,然后尝试将其导入更新版本的 MySQL WorkBench 8.0.11 后,我最近也遇到了这个问题。每个都使用社区服务器安装程序 msi 安装。

经过一番搜索后,我在 MySQL 网站上发现了这个错误报告: Restaure dump created with 5.7.22 on 8.0.11

对我有用的修复方法是手动检查我的转储文件并删除语句:

'NO_AUTO_CREATE_USER' which are located above each of your routine dumps within the dump file. Statement to remove image example

在我这样做之后我收到了错误

ERROR 1418 (HY000) at line 318: This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you might want to use the less safe log_bin_trust_function_creators variable)

但是在提到这个已回答的问题之后: This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled并简单地输入:

SET GLOBAL log_bin_trust_function_creators = 1;

在MySQL 命令行客户端解决了这个问题,最终让我能够正确导入我的数据库,其中包含所有转储的表、数据、例程和函数。

希望这能为其他人节省一些时间。

关于mysql - 变量 'sql_mode'不能设置为 'NO_AUTO_CREATE_USER'的值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50336378/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com