How To Upload Sql Files

Table of contents:

How To Upload Sql Files
How To Upload Sql Files

Video: How To Upload Sql Files

Video: How To Upload Sql Files
Video: Import Mysql Database .sql Files to Mysql 2024, December
Anonim

SQL files most often contain instructions for creating and populating database content. They are usually used to prepare the structure on the SQL server for the operation of the site, or to transfer data from one server to another. Such files contain instructions in plain text format and, as a rule, it is not difficult to upload them to the server.

How to upload sql files
How to upload sql files

Instructions

Step 1

If your hosting company has provided you with MySQL, they should also provide an appropriate management tool. There are two possible options - either the company uses its own production system, or the PhpMyAdmin application. Therefore, the first step is to look in your account admin panel for a link to the section related to databases. In the first case, you can find out about the method of downloading sql files in the hosting help section or in the support service. And in the second, the operation will begin with authorization in the "admin panel" of the application. The phpMyAdmin user interface is displayed in a browser window, like any site management system.

Step 2

After authorization, in the left column of the interface, select the name of the database into which you want to load sql files. The tables already existing in this database will be displayed in the right frame, and above them you will see a menu with links to various functions for managing the MySQL database.

Step 3

Click on the "Import" link in the menu, and the application will display the required form for loading instructions from sql files into the database. Click the Browse button, locate the first downloadable file on your computer, select it and click Open. In the "File encoding" field, set the desired value - today most often text files, including sql, are written in utf8 encoding, which is selected by default in this field.

Step 4

In the section "Format of the imported file" leave a checkmark opposite the inscription SQL and click the OK button to start loading. If everything goes well, you will see a corresponding message and can proceed to download the next set of SQL statements. If the file size turns out to be larger than the one allowed by the hoster, you will have to manually divide the instructions contained in it into several groups, save them in separate files and repeat the download for each separately.

Recommended: