如何使用Mysql Query Browser恢复转储文件

时间:2012-10-26 13:21:49

标签: mysql database restore database-administration

当我尝试从批处理文件运行某些查询时,我在查询浏览器中收到一些错误消息

我试过

source E:\Rename_scripts_unused_tables_msp.sql

我收到错误信息,如

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'source   E:\Rename_scripts_unused_tables_msp updated.sql' at line 1'

查询在命令行中运行正常。

这是我的源文件声明:

rename table appliance_backup_usage_history to unused_appliance_backup_usage_history;

rename table backup_core_server to unused_backup_core_server;

rename table bdr_vms to unused_bdr_vms;

rename table client_details1 to unused_client_details1;

rename table client_service_technologies_backup to unused_client_service_technologies_backup;

rename table cloud_instances to unused_cloud_instances;

以及更多类似的陈述

这背后的原因是什么?

1 个答案:

答案 0 :(得分:1)

sourcemysql CLI命令 - 不是SQL查询命令。它仅适用于命令行客户端mysql

https://dev.mysql.com/doc/refman/5.7/en/mysql-batch-commands.html