如何使用MySQL Workbench进行MySQL数据库备份? [英] How to take MySQL database backup using MySQL Workbench?
问题描述
如何使用MySQL Workbench进行数据库备份?我们可以通过以下方式进行备份 -
- 备份文件(.sql)包含Create Table语句和插入表语句
- 备份文件(.sql)只包含创建表语句,不包含所有表的插入到表语句
- 备份文件(.sql)不是所有表的创建表语句
打开MySql工作台。
要进行数据库备份,您需要在服务器管理
中创建新服务器实例
(如果不可用)。
创建新服务器实例
的步骤:
<
服务器管理员
中选择新服务器实例
选项。创建新的服务器实例后,它将在 / code>列表。双击您创建的服务器实例或单击
管理导入/导出
选项并选择服务器实例。
,从数据导出/恢复
选择数据导出
选项,选择模式和模式对象进行备份。
您可以使用以下不同的方式生成备份文件 -
Q.1)备份文件)包含Create Table语句和插入表语句
ANS:
- 选择开始导出选项
Q.2)备份文件)只包含创建表语句,不是所有表的插入到表语句
ANS: b
-
选择
跳过表数据(无数据)
选项 -
选择开始导出选项
Q.3)备份文件.sql)只包含插入到表语句中,而不是为所有表创建表语句
ANS: b
$ b
- 选择高级选项标签,
表
面板 - 选择- 不要编写重新创建每个转储表的CREATE TABLE语句
选项。 - 选择开始导出选项
How to take database backup using MySQL Workbench? Can we take backup in the following ways-
- Backup file(.sql) contains both Create Table statements and Insert into Table Statements
- Backup file(.sql) contains only Create Table Statements, not Insert into Table statements for all tables
- Backup file(.sql) contains only Insert into Table Statements, not Create Table statements for all tables
Open MySql workbench.
To take database backup you need to create New Server Instance
(If not available) within Server Administration
.
Steps to Create New Server Instance
:
- Select
New Server Instance
option withinServer Administrator
. - Provide connection details.
After creating new server instance , it will be available in Server Administration
list. Double click on Server instance you have created OR Click on Manage Import/Export
option and Select Server Instance.
Now, From DATA EXPORT/RESTORE
select DATA EXPORT
option,Select Schema and Schema Object for backup.
You can take generate backup file in different way as given below-
Q.1) Backup file(.sql) contains both Create Table statements and Insert into Table Statements
ANS:
- Select Start Export Option
Q.2) Backup file(.sql) contains only Create Table Statements, not Insert into Table statements for all tables
ANS:
Select
Skip Table Data(no-data)
optionSelect Start Export Option
Q.3) Backup file(.sql) contains only Insert into Table Statements, not Create Table statements for all tables
ANS:
- Select Advance Option Tab, Within
Tables
Panel- selectno-create info-Do not write CREATE TABLE statement that re-create each dumped table
option. - Select Start Export Option
这篇关于如何使用MySQL Workbench进行MySQL数据库备份?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!