Often, we may need to export local database data or import data from other databases. So how do we do this? This article will introduce the export and import of MySQL data, taking the heidisql tool as an example. First, let’s explain the export of MySQL data. Open the heidisql tool, pay attention to the 1 and 2 marked in the figure, and enter the host's IP address at 1 (if it is local, the address is 127.0.0.1). Enter the username and password of the MySQL database at 2, and set the other settings as shown in the figure. Click Open to enter the database management interface. Enter the management interface as shown in the figure. You can select the database at 1 on the left, and the data information of the selected database will be automatically displayed at 2 on the upper right. Right-click the database where you need to export data and select Export Data Script. Then, select the export format. Generally, the export format is .sql. You can customize the export location. After setting, click the Export button Go to the export directory to view the file test.sql just exported, open it with notepad++, and you can see the creation of the database and table and the insertion of data. So far, the export of database data has been explained. The following explains how to insert existing database data into the database 1 First, open the .sql file with notepad++, select all the data with ctrl+a, and copy it. 2 Open heidisql, paste the data you just copied in 1 in the figure, click the run button in 2 in the figure, a warning may be generated, click OK, then press F5 to refresh the list, you can see that the database has been successfully created and the data has been inserted So far, the export and import of database data have been introduced. I believe that you have fully learned it. You may also be interested in:
|
<<: Echarts legend component properties and source code
>>: Quickly solve the problem that CentOS cannot access the Internet in VMware
Table of contents Preface 1. Common bug fixes in ...
<meta http-equiv="X-UA-Compatible" c...
Precautions 1) Add interpreter at the beginning: ...
This article shares the specific code of making a...
1 What is BEM Naming Standard Bem is the abbrevia...
WML (Wireless Markup Language). It is a markup la...
Preface In project development, there are many wa...
Table of contents Node Event Loop Event loop diag...
This article uses examples to illustrate the usag...
This article introduces an example of how to use ...
Table of contents 1. Vue3 component communication...
Achieve results Implementation Code html <h1 c...
When the height attribute of Text is defined, the ...
This article shares the download, installation an...
Copy code The code is as follows: .sugLayerDiv{ p...