How To Import A Database

Table of contents:

How To Import A Database
How To Import A Database

Video: How To Import A Database

Video: How To Import A Database
Video: how to import and export database in sql Server 2019 2024, May
Anonim

To import MySQL databases from files containing SQL statements, it is most convenient to use phpMyAdmin - in fact, this application has already become a world standard. It allows you to carry out the necessary operations directly in the browser window and is included in the basic set of tools offered by the absolute majority of hosting providers. The phpMyAdmin program is distributed by the manufacturer free of charge and can be installed on any system.

How to import a database
How to import a database

Necessary

phpMyAdmin app access

Instructions

Step 1

Load the phpMyAdmin home page into your browser, enter your username and password and enter the management interface of this application.

Step 2

Create a database with the desired name if the CREATE DATABASE command is not included in the imported database files. To do this, enter a name in the field under the "New Database" label in the right frame of the phpMyAdmin main page and click the "Create" button.

Step 3

Click the Import link in the right frame of the interface. If you have created a database before, then you need to look for it in the top row of commands, and if this step was not needed, then you will find such a link at the bottom of the main page.

Step 4

Find out if you need to split the imported database files into several parts. This may be necessary if their sizes exceed the limit set in the server settings. The maximum allowable size can be found in the inscription in brackets located to the right of the "Browse" button. If necessary, split the lines of SQL statements from the database files in a different way and save them into smaller files.

Step 5

Find the first imported file in the standard file open dialog, which is launched by clicking on the "Browse" button. Having found and selected it, click the "Open" button.

Step 6

Change the encoding specified in the File encoding field if it differs from the one used when saving the imported database files. This is only necessary if there are text fields in the tables that contain non-English characters.

Step 7

Click the "OK" button located at the very bottom of the right frame of the phpMyAdmin interface and the application will start sending the imported data to the server SQL statements.

Step 8

Repeat the last three steps as many times as necessary if you have more than one instruction file.

Step 9

If the imported database is small, then you can do without downloading files. There are four square icons at the top of the left frame - click the second one from the left ("Query Window"). A small window will open where you can paste the SQL query strings by copying them from the database file. Then click the "OK" button and the instructions will be sent to the server.

Recommended: