How To Unload Sql Database

Table of contents:

How To Unload Sql Database
How To Unload Sql Database

Video: How To Unload Sql Database

Video: How To Unload Sql Database
Video: The fastest way to unload data 2024, December
Anonim

MySQL is one of the most popular database management systems today. Often, users need to dump the database using this system. For beginners, as a rule, this task is impossible, therefore, to solve this problem, you need to know a few tricks and have some theoretical knowledge in the field of DBMS.

How to unload sql database
How to unload sql database

It is necessary

access to hosting

Instructions

Step 1

To create a backup copy of the MySQL database (that is, upload), go to the control center of your hosting, which contains all the files of your web resource, including the database files. On the management page, find the phpMyAdmin application and launch it (this application is installed on most modern hosting sites). After starting the application, go to the "Export" tab. A large number of options will open. Study them.

Step 2

If you only need a backup of the MySQL database, do not change anything in the export options. If you plan to put the backup copy of the database back on the server, then use the "Add DROP DATABASE" option. In this case, when uploading a backup copy of a database to the server, which has the same name as the database already on the hosting, the uploaded dump will replace the old database. The same, but for tables in the database the option "Add DROP TABLE" does. After setting all the necessary settings, click the OK button.

Step 3

After that, the page will be able to download a dump of the MySQL database to your computer. To upload this backup to a new hosting (and in most cases, the database is unloaded for this very purpose), then use the phpMyAdmin application again. Go to the "Import" tab, select the MySQL database backup and click OK.

Step 4

There is also a way to dump the database without using phpMyAdmin. To do this, use the command line of your hosting. Enter this line in the console: mysqldump my_database --user = imya_pol'zovatelya --password = moi_parol> kopiya.sql. After that, a backup copy called kopiya.sql will appear on the hosting. To upload a database dump to the hosting, enter the following command: mysql -u username -p database <kopiya.sql. Enter your password when prompted.

Recommended: