Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use Navicat to export and import database in mysql

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

In this issue, the editor will bring you about how to use Navicat to export and import database in mysql. The article is rich in content and analyzes and describes for you from a professional point of view. I hope you can get something after reading this article.

Export the database:

Open Navicat, right-click the data we want everywhere, then click "dump SQL File" on the pop-up shortcut menu, 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, and after selecting the location, click OK, and then OK.

Import the database:

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

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

Strictly speaking, what Navicat for MySQL exports is not the database, but the data and structure of all the tables in the database. So, if you don't create a corresponding database, but choose a random data import, the result is that the database has several more tables that have just been imported.

Summary of import and export methods for PS:mysql database.

General form: mysqldump-h IP-u user name-p database name > exported file name.

(1)-p cannot be followed by password, but can only be entered separately as in 1. (2) mysqldump is a command under cmd and cannot be entered under mysql, that is, you cannot enter mysql (that is, under use dpname, you have to exit exit under mysql.)

One: export of database (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

Second: import (restore) of database

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

Mysql-h localhost-u root-p (go under mysql).

Create database abc; (create database).

Show databases; (you can see all the existing databases, as well as the database abc you just created).

Use abc; (go to the abc database).

Show tables; (see all the tables under the abc database, empty).

Source G:\ arcgisworkspace\ zypdoc\ test.sql (import database tables).

Show tables; (look at all the tables under the abc database and you can see the tables).

Desc pollution; (view the table structure design).

Select * from pollution

Exit (or ctrl + c) exits mysql.

The above is how to use Navicat to export and import the database in the mysql shared by the editor. If you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report