How To Export A Database

Table of contents:

How To Export A Database
How To Export A Database

Video: How To Export A Database

Video: How To Export A Database
Video: Exporting MySQL databases and tables using phpMyAdmin 2024, May
Anonim

The easiest way to export a MySQL database to a text file is to use the phpMyAdmin application. It provides an easy-to-understand interface for managing databases directly in the browser window. This application is installed by the vast majority of hosting providers, and if necessary, the fresh distribution can be downloaded for free from the manufacturer's website.

How to export a database
How to export a database

Necessary

PhpMyAdmin application access

Instructions

Step 1

Load the phpMyAdmin interface into your browser window, log in and select the one you want to export from the list of databases in the left frame.

Step 2

In the upper part of the right frame on the page of the selected database, there is a menu with links to various groups of operations. Click the "Export" link in it.

Step 3

Click the "Select All" link in the "Export" section of the Export Options Settings page. If you need to export not the entire database completely, but only a part of its tables, then click with the mouse in this list only the tables you need, while holding down the CTRL key.

Step 4

Check the box next to the required export format in the list. By default, SQL is checked here, but if the database is exported for subsequent loading into any office application, then select the appropriate format in this list.

Step 5

If the SQL format is specified, then it is necessary to check the correctness of the settings in the "Parameters" section. Pay particular attention to the settings in the "Structure" section. If in the process of exporting in the "Add DROP TABLE" field is checked, then instructions for deleting existing tables with matching names will be added to the file. This means that when you import it later, the existing data will be destroyed and replaced with new data. If you plan to add the content of another database from this one, then the mark should be removed. If the "Add IF NOT EXISTS" option is checked, then instructions will be placed in the export file, as a result of which the data will be added to the contents of tables with matching names.

Step 6

Check the box "Save as file". In the absence of this checkbox, the exported data will be displayed in a text field directly in the phpMyAdmin interface page. If there is not a lot of data, then this option may even be preferable - the data can be copied and further used at your discretion.

Step 7

Click the OK button at the bottom of the right frame to start exporting the database.

Recommended: