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

A brief analysis of the count tracking of a request in nginx

First, let me explain the application method. The...

About input file control and beautification

When uploading on some websites, after clicking t...

VMware Workstation Pro installs Win10 pure version operating system

This article describes the steps to install the p...

The use of textarea in html and common problems and case analysis

The textarea tag is an HTML tag that we often use....

XHTML tags should be used properly

<br />In previous tutorials of 123WORDPRESS....

This article will show you the principle of MySQL master-slave synchronization

Table of contents Brief Analysis of MySQL Master-...

Solution to Nginx session loss problem

In the path of using nginx as a reverse proxy tom...

Nginx configuration SSL and WSS steps introduction

Table of contents Preface 1. Nginx installation 1...

Mysql experiment: using explain to analyze the trend of indexes

Overview Indexing is a skill that must be mastere...

CSS Naming: BEM, scoped CSS, CSS modules and CSS-in-JS explained

The scope of css is global. As the project gets b...