In the construction of PHP website, the maintenance of MySQL database is the daily work, MySQL database import and export to achieve backup function is one of them, in the previous PHP tutorial I introduced a number of MySQL command to maintain the MySQL database article, Today to say how to use phpMyAdmin to the MySQL database for import and export operations to achieve database backup, phpMyAdmin as the maintenance of MySQL database Third-party visualization tool, the operation is very convenient.
Before you use phpMyAdmin for import and export operations, you first need to login to the phpMyAdmin management interface, where you must check that your MySQL service is turned on or not landing phpMyAdmin, you can
Start the MySQL service.
phpMyAdmin Export Tutorial
Maintain MySQL database, ensure data security, the first step is to periodically export (backup) MySQL database related data, so we first say how to use phpMyAdmin to export MySQL database, and use mysqldump export MySQL database similar, You can set the database to be exported by phpMyAdmin or specify to export a single datasheet.
phpMyAdmin Export First step : Click on the right-hand side of the Export menu link, phpmyadmin Export page divided into the left and right two parts, the left side of the need to export the database (you can choose either all export or export a database), Then select phpMyAdmin exported file types, the default export is SQL format export, and other commonly used export formats are CSV, WORD, XLS, Yaml, and so on.
phpMyAdmin Export Part II : Make option settings in the phpMyAdmin Export page, as shown in
phpMyAdmin Export Options
phpMyAdmin Export Database Options
phpMyAdmin Export Data Options
phpMyAdmin Export Options Description :
1. If you need to export multiple SQL files using phpMyAdmin, you can use the annotation options to explain.
2, if you may need to migrate in different databases, you can select the appropriate database in SQL compatibility mode, such as Oracle.
3, phpMyAdmin exported data options can be set to export types of data, the default is insert, and the other update, REPLACE, the difference is that in the future phpMyAdmin import, insert if the original row with the conflict will exit, Replace will overwrite the original line, so you can set the options for the drop if you need to.
phpMyAdmin Export Part III : command saved SQL files, here I named my blog URL leapsoul.cn.
phpMyAdmin Export Special note : phpMyAdmin export of different functions are exported, if you are through the phpMyAdmin login after the main interface into the Export page, then the MySQL database is the export operation, If it is by clicking on the phpMyAdmin to the left of the specific database into the phpMyAdmin export interface, then the export of a certain database, not only can export the specified database all content, you can specify the specific data table export.
phpMyAdmin Import Tutorial
When an exception occurs in the Web site database, if we have previously backed up the database, we can simply import the previously exported SQL file into the appropriate database via the MySQL command or by using phpMyAdmin. As shown in figure
phpMyAdmin Import Settings page
phpmyadmin Import First step : Click on the right to import the menu link, in the File section to import, click the Select File (select the previous phpMyAdmin exported SQL file). We note that there is a (max limit 2M) hint on the right, which is to tell you that the maximum file size limit for phpMyAdmin is 2M, and if you want to phpMyAdmin import large files, the easiest way is to modify the configuration of the file upload size in php.ini configuration file.
phpMyAdmin Import the second step : Import the file's character set, the default is UTF8, here you need to note that the phpMyAdmin import exported SQL file character set must be consistent, otherwise it will cause the MySQL database garbled.
part of the import instructions : Major applications in the large file upload interrupt, you can start from the break line to continue the import.
The Import file Format section is actually similar to the phpMyAdmin Export page section, as long as you choose the correct phpmyadmin import file format.
Finally click to perform the operation to complete the phpMyAdmin import operation.
At this point, through the use of phpMyAdmin to the MySQL database to import and export operations to achieve Database maintenance tutorial is done, skilled Operation phpMyAdmin Import export operation is actually as convenient as using the mysqldump Export command.
Note : PHP Web Development Tutorials-leapsoul.cn Copyright, reproduced in the form of links to indicate the original source and this statement, thank you.