Home page
 
 Home 
 ASP 
 PHP 
 SQL 
 HTML 
 JavaScript 
 Search 
 Contact 
 
Search
or browse popular tags
Access Functions
Subscription

Sign up for the free email newsletter for new tips, tutorials and more. Enter your email address below, and then click the button.

Privacy Policy

RSS Twitter

How to create a dump of MySQL database in one click

Print

Your users probably asked you to add an option to export the whole database to SQL file. This can be done in phpMyAdmin or Navicat of course but your users want something simpler than that.

Create a new file named backup.php and paste the following code snippet there. Edit database connection settings and path to mysqldump if required. Add a link to backup.php to your application:

Export the whole database

Please note that this script requires write permissions on scripts folder in order to save dump to file and zip it. If your scripts do not have such permissions use the second version of script. The only downside is that dump file won't be zipped.

Version with zipping. Requires write permissions on scripts folder.

Version without zipping. Write permissions are not required.




Tags:

Add To: Add to dzone dzone | Digg this digg | Add to del.icio.us del.icio.us | Stumble it stumbleupon

  • Comments





Copyright © 2005-2023             www.WebCheatSheet.com All Rights Reserved.