How To Transfer The Database

Table of contents:

How To Transfer The Database
How To Transfer The Database

Video: How To Transfer The Database

Video: How To Transfer The Database
Video: Move a mySQL database from one server to another using export and import 2024, December
Anonim

Many site developers sometimes face the issue of transferring their databases in connection with the transition to a new hosting. This is necessary in order not to lose important data stored in the tables, and to preserve the lists of users so that they do not have to register again. To carry out the operation, you do not need to have any special knowledge of MySQL, sometimes it is enough to have only a little experience with the phpMyAdmin panel.

How to transfer the database
How to transfer the database

Instructions

Step 1

Open both hosting accounts and go to the phpMyAdmin DB control panel via the admin panel.

Step 2

First, you need to export data from the old hosting. To do this, select the database you need to export in the left part of the control panel window. Select Export from the top navigation menu. Pay attention to the encoding displayed in the "Comparison" column of the table.

Step 3

Check the boxes on the left side of the window opposite the name of each table. The export is best done as text, so select ANSI in the "export compatibility" column. Be sure to check the box next to "Send". Select the type of compression at your discretion. Select "SQL" on the left side of the window.

Step 4

Go to phpMyadmin of the new account and create a new empty database with the desired name. In the top bar, select the "Structure" menu and delete any tables that you may have created before.

Step 5

Next, import. Select the encoding that was specified in the old database (column "Comparison"). Check the box next to "Allow the script to break the import process …". Select "SQL" as the import file format and select "ANSI" for the compatibility options.

Step 6

The time to transfer the database depends directly on the speed of your connection, although usually the process takes no more than 2-3 minutes. If an error appears during the import process, be sure to translate it, fix the problem and try to carry out the transfer from the very beginning. After unsuccessful attempts, delete tables only on the new account. If the transfer fails, then feel free to experiment with the settings. The set of parameters depends on the settings of each MySQL server.

Recommended: