If you, like us here at Wohill, run your blog or web site on an environment with PHP and MySQL, there might also be a chance that your admin interface is built with , which is a MySQL database administration tool. It is available in 55 languages with which basically means that anybody can use it, but read more about it to be sure.
On the web hotel where our blog is hosted there is such an environment and I must say that it is very easy to use and also powerful. You can easily create, modify and delete tables within a database and add, modify and delete fields for the tables in an intuitive way.
Backup or Export the data:
If your data is on a web hotel there is a big chance that there are already backup routines. However if it isn't or just to be really safe you can make backups yourself once in a while in case you for some reason would loose it all. Someone might get into your site via some interface and delete it all or you might be a victim of SQL-injection for example. There could be numerous of reasons.
So except for the obvious security precautions like changing your password once in a while etc. you could also export all of your data in the MySQL-database to a simple text file or a so-called .sql-file. The picture below shows the first page where you can see the option 'Export' which is the one to choose if you want to backup.

The picture below shows the page with the settings for the export. As you can see you can choose to export the data to different destinations like a pdf, cvs, excel or sql-file. I choose to export it as an sql-file since it later on can be used to import the data in case of any loss. You can pretty much leave the default settings as is but be sure to mark the checkbox for 'Save as file'. Below this setting you can also choose the filename and decide if the file should be zipped as well or not.

So in case of data loss you only need to run this file and all data will be restored again (the way it was when you last created the sql-file that is). And the way you will run it with the phpMyAdmin interface is via the import functionality in the equivalent way as for the export functionality.

What really happens is that the SQL-code runs, which looks something like this:
CREATE DATABASE `theDatabaseName` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci; USE `theDatabaseName`;
CREATE TABLE `theTableName` ( `id` int(4) unsigned NOT NULL auto_increment, `name` varchar(45) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=9 ;
INSERT INTO `theTableName` VALUES (6, 'Text text text'); INSERT INTO `theTableName` VALUES (7, 'Text text text'); INSERT INTO `theTableName` VALUES (8, 'Text text text');
etc. etc. for all tables and values...
|