简体   繁体   English

使用Sequel Pro对MySQL DB进行本地备份

[英]Local Backup of MySQL DB with Sequel Pro

I have a MySQL database stored on AWS. 我有一个存储在AWS上的MySQL数据库。 I'm using Sequel Pro to manage it. 我正在使用Sequel Pro进行管理。 I want to make a local copy for backup. 我想制作一个本地副本进行备份。 In Sequel Pro, I see an option to File -> Export. 在Sequel Pro中,我看到“文件”->“导出”的选项。 I'm selecting SQL as the format. 我选择SQL作为格式。 By default, the option to "Include Drop Table Syntax" is checked. 默认情况下,选中“包括删除表语法”选项。 Any ideas what this means? 任何想法,这意味着什么? I want to rule out the possibility that it will drop my production AWS database after export. 我想排除导出后将其删除生产AWS数据库的可能性。

It just means that the generated script will include DROP TABLE statements in addition to CREATE TABLE and INSERT . 这仅意味着生成的脚本除了CREATE TABLEINSERT之外还将包括DROP TABLE语句。 The statements will be executed when you run the script to restore the database. 这些语句将在您运行脚本以还原数据库时执行。

If checked it add a statement some thing like below before the CREATE TABLE statement 如果选中它,则在CREATE TABLE语句之前添加一条类似于以下内容的语句

DROP TABLE IF EXISTS tbl_name; 如果存在则删除表tbl_name;

The idea is you can import this exported sql in database with existing table 想法是您可以使用现有表将导出的sql导入数据库中

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM