Test learning -117-mysql data migration under the same database and table structure

Foreword:

     Today I will tell you about mysql data migration. As a test engineer, you will definitely encounter the situation of test environment migration. For example, because of test needs, you need to migrate from server A to server B. MySQL data must also be migrated. it's actually really easy. I use the Navicat database tool to generate the sql script on the A server, and then go to the B server to execute the response script.

Requirements: The database structure and table structure of mysql on the two servers are exactly the same.

The data migration flowchart is shown below

 1. Export the .sql data script from the A database

Of course, you can also select a part of the data to export, for example, export 2 pieces of data, click filter-add id<3

 2. Export the sql file

 

 Finally, the next step, the next step, the next step is to export to the desktop XX.sql file,

3. Import the sql file into another database B

Select the file to import.

Click Start, if no error is reported halfway, and successful appears , it means that the data import was successful.

Leave a message for the question, you must reply when you see it

Guess you like

Origin blog.csdn.net/u013521274/article/details/115049385