How can I backup or download or whatever the MySQL databases on my webserver?
Printable View
How can I backup or download or whatever the MySQL databases on my webserver?
use phpmyadmin...goto the database summary page
Near the bottom it has a section "View dump (schema) of database"
Click Select All, chose Structure and Data, tick Save As File
Click go, save it somewhere on your HDD
What you now have is an .sql file which contains the SQL queries needed to recreate the whole db...table creation and record insert SQL all there in one file.
If you ever do need to restore it, just run the file through the execute query section by clicking Browse
Sweet. I wonder if I could create a script to do this and make it run once every week?
You could copy the relevent code from phpmyadmin ;)