How to unload sql base

How to unload sql base

MySQL — one of the management systems of the database most popular today. Often users have a need to unload the database, using this system. For beginners, as a rule, this task is impracticable therefore for the solution of this problem it is necessary to know several cunnings and to have some theoretical knowledge of the DBMS area.

It is required to you

  • - access to a hosting.


1. For creation of the backup copy of the MySQL database (that is unloadings) come into control center of your hosting on which all files of your web resource including the DB files are placed. On the page of management we find the phpMyAdmin application and we start it (this application is installed on the majority of modern hostings). After application launch select the Export tab. A large number of parameters will open. Study them.

2. If you need only the backup copy of the MySQL database, change nothing in export options. If you plan to put the backup copy of a DB back on the server, then use the option "Add DROP DATABASE". In it couples when loading on the server of the backup copy of a DB, the having identical name from the DB which is already on a hosting, the loaded dump will replace the old database. The same, but for tables in a DB the option "Add DROP TABLE" does. After installation of all necessary settings press the OK button.

3. After that on the page there will be an opportunity to download a dump of the MySQL database on your computer. To load this backup copy on a new hosting (and in most cases unloading of a DB becomes for this purpose), again use the phpMyAdmin application. Select the Import tab, select the backup copy of a DB of MySQL and click OK.

4. Also there is a way of unloading of the database without use of phpMyAdmin. For this purpose use the command line of your hosting. Enter this line into consoles: mysqldump my_database - user=imya_pol'zovatelya - password=moi_parol> kopiya.sql. After that on a hosting the backup copy under the name kopiya.sql will appear. To load a DB dump on a hosting enter the following command: mysql - u username - p database <kopiya.sql. Enter the password at request.

Author: «MirrorInfo» Dream Team