Home > Database > navicat > Navicat practical functions: data backup and structure synchronization

Navicat practical functions: data backup and structure synchronization

步履不停
Release: 2019-06-19 15:18:24
Original
5014 people have browsed it

Navicat practical functions: data backup and structure synchronization

Summary

When we want to do risky operations on the database, we need to back up the database every time we go online During projects, there will always be inconsistencies in the online and offline database structures. This article will explain how to use Navicat to easily solve these two problems.

Navicat

Navicat is a set of fast and reliable database management tools designed to simplify database management and reduce system management costs. It is designed to meet the needs of database administrators, developers and small and medium-sized businesses. Navicat is built with an intuitive graphical user interface that allows you to create, organize, access and share information in a secure and simple way.

Note: This tutorial uses Navicat12 version, download address: www.navicat.com.cn/download/navicat-premium

Introduction to using the database

Now there are two databases in the database, mall-test represents the test environment database, and mall-prod represents the online environment database.

Data Backup

Now we first back up the mall-test database. After the backup is completed, delete the data in the product table, and then use the backup to restore the data.

Data overview in mall-test

Currently there is only the database table of the product module in the database, and there is certain data in the pms_product table.

下载 (2).jpg

下载 (3).jpg

Backup data

  • First click the backup icon on the top toolbar , then click the New Backup button

下载 (4).jpg

  • Click the Start button to start the backup

下载 (5).jpg

  • After the backup is completed, a backup file will be generated

下载 (6).jpg

Clear the data of the pms_product table

下载 (7).jpg

Restore data from backup

下载 (8).jpg

下载 (9).jpg

##Structure synchronization

Related background description

The original mall-test module only had the table of the product module. Now after a period of development, we have added the order module, and at the same time deleted and modified some tables of the product module. The mall-prod table still has the original product module table. What we need to do now is to synchronize the database table structure of mall-test to mall-prod.

下载 (10).jpg

下载 (11).jpg

Perform structure synchronization

  • Select the structure synchronization function

下载 (12).jpg

  • Select the source database and target database and click the comparison button

下载 (13).jpg

  • You can see the modified, added and deleted table information. Click Deploy and a preview of the sql script will appear

下载 (14).jpg

    ##After confirming the deployment script information, click Run to synchronize the data structure

下载 (15).jpg

  • When the structure was synchronized again, it was found that the two database structures were completely consistent

下载 (16).jpg

The above is the detailed content of Navicat practical functions: data backup and structure synchronization. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template