1、问题出现原因
Task execution failed 原因: Error executing process;
ERROR at line 1264: Unknown command '\\'.Task 'MySQL restore' finished at Tue Feb 21 16:18:20 CST 20232023-02-21 16:18:20.906 - IO error: Process failed (exit code = 1). See error log.2023-02-21 16:18:20.907 - java.io.IOException: Process failed (exit code = 1). See error log.at org.jkiss.dbeaver.tasks.nativetool.AbstractNativeToolHandler.validateErrorCode(AbstractNativeToolHandler.java:230)at org.jkiss.dbeaver.tasks.nativetool.AbstractNativeToolHandler.executeProcess(AbstractNativeToolHandler.java:210)at org.jkiss.dbeaver.tasks.nativetool.AbstractNativeToolHandler.doExecute(AbstractNativeToolHandler.java:270)at org.jkiss.dbeaver.ext.mysql.tasks.MySQLNativeToolHandler.doExecute(MySQLNativeToolHandler.java:47)at org.jkiss.dbeaver.tasks.nativetool.AbstractNativeToolHandler.lambda$0(AbstractNativeToolHandler.java:76)at org.jkiss.dbeaver.runtime.RunnableContextDelegate.lambda$0(RunnableContextDelegate.java:39)at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
2、问题出现原因
mysql 默认以 gbk 编码连接数据库,之前导出备份文件是 utf8 编码,编码不一致导致错误。
3、解决方案
在执行脚本之前配置一下,加上指定编码执行即可。
--default-character-set=utf8mb4
来源地址:https://blog.csdn.net/liming1016/article/details/129144957