Backing up my MySQL data

This may not be of use or interest to anyone else, but at least I’ll remember where I stored this command for my own future use.

mysqldump -u root -p --events --ignore-table=mysql.event --all-databases > all_databases07.sql

So what does it do:


mysqldump -u root -p

Calls the mysqldump program using user root and prompting for root’s password.


--events --ignore-table=mysql.event

In version 5.1.6, scheduled events were added which therefore leads to a warning message if we don’t exclude the events table.


--all-databases

Does what it says on the tin, backup up all the databases. You could instead backup a single or group of databases using


--databases db_name1 db_name2 db_name3

And finally


> all_databases07.sql

The filename to store it all in. I manually change a sequential number but any filename will do.

Full on-line reference manual for MySQLdump is here.

Advertisements

About Words of Little Relevance

Freelance stage manager; software and web tester; Excel and map geek; Tweeter; Blogger and Cake Eater. Often back-stage in and around Oxfordshire and Buckinghamshire where I move scenes, or play with lights or sound.
This entry was posted in Technical and tagged , , . Bookmark the permalink.

2 Responses to Backing up my MySQL data

  1. litadoolan says:

    Clever stuff. A totally new language that looks poetic and powerful and is so relevant to our modern life just now (I braved inputting a computer terminal command not really knowing what I was doing. Thankfully all is good!). Respect!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s