如何使用MySQL Workbench进行MySQL数据库备份? [英] How to take MySQL database backup using MySQL Workbench?

查看:416
本文介绍了如何使用MySQL Workbench进行MySQL数据库备份?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用MySQL Workbench进行数据库备份?我们可以通过以下方式进行备份 -


  1. 备份文件(.sql)包含Create Table语句和插入表语句

  2. 备份文件(.sql)只包含创建表语句,不包含所有表的插入到表语句

  3. 备份文件(.sql)不是所有表的创建表语句


解决方案

打开MySql工作台。
要进行数据库备份,您需要在服务器管理中创建新服务器实例(如果不可用)。



创建新服务器实例的步骤:



<
  • 服务器管理员中选择新服务器实例选项。

  • 提供连接详细信息。

  • 创建新的服务器实例后,它将在 / code>列表。双击您创建的服务器实例或单击管理导入/导出选项并选择服务器实例。



    ,从数据导出/恢复选择数据导出选项,选择模式和模式对象进行备份。



    您可以使用以下不同的方式生成备份文件 -



    Q.1)备份文件)包含Create Table语句和插入表语句



    ANS:


    1. 选择开始导出选项

    Q.2)备份文件)只包含创建表语句,不是所有表的插入到表语句



    ANS: b


    1. 选择跳过表数据(无数据)选项


    2. 选择开始导出选项


    Q.3)备份文件.sql)只包含插入到表语句中,而不是为所有表创建表语句



    ANS: b
    $ b


    1. 选择高级选项标签,面板 - 选择 - 不要编写重新创建每个转储表的CREATE TABLE语句选项。

    2. 选择开始导出选项


    How to take database backup using MySQL Workbench? Can we take backup in the following ways-

    1. Backup file(.sql) contains both Create Table statements and Insert into Table Statements
    2. Backup file(.sql) contains only Create Table Statements, not Insert into Table statements for all tables
    3. 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:

    1. Select New Server Instance option within Server Administrator.
    2. 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:

    1. Select Start Export Option

    Q.2) Backup file(.sql) contains only Create Table Statements, not Insert into Table statements for all tables

    ANS:

    1. Select Skip Table Data(no-data) option

    2. Select Start Export Option

    Q.3) Backup file(.sql) contains only Insert into Table Statements, not Create Table statements for all tables

    ANS:

    1. Select Advance Option Tab, Within Tables Panel- select no-create info-Do not write CREATE TABLE statement that re-create each dumped table option.
    2. Select Start Export Option

    这篇关于如何使用MySQL Workbench进行MySQL数据库备份?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆