How to use Navicat to export and import mysql database

How to use Navicat to export and import mysql database

MySql is a data source we use frequently. It is very convenient for developers to use for practice, small private game servers, or personal software. For making some personal auxiliary software, choosing MySQL database is a wise choice. Having a good tool can make you get twice the result with half the effort. For MySql IDE, I recommend Navicat for MySql. Now I will introduce to you how to use Navicat for MySql to export and import data.

Export the database:

Open Navicat, right-click the mouse on the data we want to export, and then click "Dump SQL File" on the shortcut menu that pops up, and select the first "Data and Structure" in the submenu item that pops up again.

Then, a save box will pop up to select the save location. After selecting the location, click OK.

Import the database:

Open Navicat for MySQL, then right-click and select New Database. The name should be the same as the name of the data we want to import.

After clicking OK, we can see the data we just created appear on the left, then right-click and select "Run SQL File" and a box will pop up. Click "..." to select the path where the file is located.

Click Start and the file will be imported successfully!

Strictly speaking, what Navicat for MySQL exports is not the database, but the data and structure of all tables in the database. Therefore, if you do not create a corresponding database, but import data randomly, the result is that this database will have several more tables that have just been imported.

PS: Summary of mysql database import and export methods

General format: mysqldump -h IP -u username -p database name > exported file name

(1) You cannot add a password after -p. You can only enter it alone as in 1. (2) mysqldump is a command under cmd. It cannot be used under mysql. That is, you cannot enter mysql (that is, use dpname. You must exit mysql to do so.)

1: Database export (backup)

0: (Backing up the database means exporting all tables and data without adding -d)

mysqldump -h localhost -u root -p test > G:\arcgisworkspace\zypdoc\test.sql
mysqldump -h 10.180.6.183 -u root -p dmsdev > D:\imssdb\20170930\dmsdev20170930.sql
mysqldump -h 10.180.6.183 -u root -p newfwk > D:\imssdb\20170930\newfwk20170930.sql
mysqldump -h 10.180.6.183 -u root -p dcsdev > D:\imssdb\20170930\dcsdev20170930.sql

2: Database import (restore)

0: Import the database (create the data first, then import it) C:\Program Files\MySQL\MySQL Server 5.5\bin>

mysql -h localhost -u root -p (enter mysql)

create database abc; (create database)

show databases; (You can see all existing databases and the database abc just created)

use abc;(enter the abc database)

show tables; (show all tables under the abc database, empty)

source G:\arcgisworkspace\zypdoc\test.sql (import database table)

show tables; (view all tables under the abc database, and you can see the table)

desc pollution;(see table structure design)

select * from pollution;

exit (or ctrl + c) to exit mysql

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • Detailed explanation of MySQL command line export and import database instance
  • Steps to import mysql database under wampserver
  • MySQL command line export and import database
  • Modify php.ini to implement the maximum limit of Mysql import database file modification method
  • Windows cannot start MySQL service and reports error 1067 solution
  • mysql service cannot start and reports error 1067 solution (mysql startup error 1067)
  • When MySQL is upgraded to 5.7, WordPress reports error 1067 when importing data

<<:  Zabbix monitors the process of Linux system services

>>:  Win10 install Linux ubuntu-18.04 dual system (installation guide)

Recommend

Implementation of CSS circular hollowing (coupon background image)

This article mainly introduces CSS circular hollo...

The process of installing SVN on Ubuntu 16.04.5LTS

This article briefly introduces the process of se...

Detailed explanation of virtual DOM in Vue source code analysis

Why do we need virtual dom? Virtual DOM is design...

JS implements a simple counter

Use HTML CSS and JavaScript to implement a simple...

Two implementation codes of Vue-router programmatic navigation

Two ways to navigate the page Declarative navigat...

MySQL 5.7.18 installation tutorial under Windows

This article explains how to install MySQL from a...

Detailed explanation of MySQL semi-synchronization

Table of contents Preface MySQL master-slave repl...

CSS3 realizes the childhood paper airplane

Today we are going to make origami airplanes (the...

MySQL index principle and usage example analysis

This article uses examples to illustrate the prin...

How to use the Linux nl command

1. Command Introduction nl (Number of Lines) adds...

Detailed tutorial for upgrading zabbix monitoring 4.4 to 5.0

1. Zabbix backup [root@iZ2zeapnvuohe8p14289u6Z /]...

CSS3 Tab animation example background switching dynamic effect

CSS 3 animation example - dynamic effect of Tab b...

Detailed explanation of the practical application of centos7 esxi6.7 template

1. Create a centos7.6 system and optimize the sys...

Detailed explanation of using echarts map in angular

Table of contents Initialization of echart app-ba...