1

Backup MySQL Database without PHPMyAdmin


When I heard that there is no graphical interface for managing MySQL database on the school web server during the first day of my CA 282 class, I thought that was a good thing because I can in depth learn SQL query language. However, after several months of usage, I noticed that I couldn’t be able to backup my database for the localhost use of the database without using PHPMyAdmin. This made me frustrating because I want my CA282 assignments to be published after I reviewed and tested on my local machine.

Because of this reason, I searched around the Internet and found a useful PHP script on mt-soft.com.ar, The script is called MySQLdump. It will dump out all the data inside a database an allows me to download the zip achieve or .sql file. Since I’m able to view the source code once I downloaded this PHP file, I decided to modify the code to work for my own purpose – to backup the database to my localhost.

The script originally had some advanced output options which it doesn’t have any usefulness to me.

Original page layout
Click the image to enlarge

So I changed into the following:

Modified page layout
Click the image to enlarge

Basically. the data in the MySQL database will be dumped out to the text box once the page is loaded. I can then copy the content in the text area to the PHPMyAdmin in my local machine. If I want one more copy in my hard drive, I can click the Download button to download the .sql file.

You can download the source code for the modified PHP script and the download page from here and the demonstration of this script is here.


There are no posts related to Backup MySQL Database without PHPMyAdmin.

  1. isogashii says:

    Thank you,
    I was looking for a php script to backup MySQL database with one button,
    Good luck :)