sankolite

Now to backup the databases I will use mysqldump, this is one of the preferred ways to backup as recommended by mysql (http://dev.mysql.com/doc/refman/5.5/en/using-mysqldump.html)

To create a backup of a specific database you do: –

prompt>mysqldump -u bob -p –databases name_of_database > backup_of_database.sql

The above will create a backup of the database on the form of backup_of_database.sql

Now to restore the database into mysql if it ever got deleted you would do: –

prompt>mysqldump -u bob -p –databases name_of_database < backup_of_database.sql

Make sure that the database name has been created in mysql before you start restoring a backup otherwise you will receive an error message saying that it can’t find the database. Note that the only change to the commmands are the redirection, i.e. > and <

You can always create the database by using the following command: –

mysql>CREATE DATABASEname_of_database_you_want_to_create;

Quite simple stuff…

View original post 48 more words

Advertisements