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:
|
<<: Zabbix monitors the process of Linux system services
>>: Win10 install Linux ubuntu-18.04 dual system (installation guide)
Simply put, src means "I want to load this r...
When insert into employee values(null,'張三'...
1. Download jdk download address我下載的是jdk-8u221-li...
* address - address * blockquote - block quote * c...
Table of contents DOM processing Arrays method Su...
<br />Previous article: Web Design Tutorial ...
Excel is the most commonly used tool for data ana...
This article example shares the implementation me...
When I was writing join table queries before, I a...
Table of contents chmod Example Special attention...
1. First, use springboot to build a simple dubbo ...
Table of contents Browser Same Origin Policy 1. V...
pthread_create function Function Introduction pth...
Table of contents need: Function Points Rendering...
This article shares the implementation code of jQ...