QandA – How Do I Backup MySQL Databases?

How do I backup mysql info for my forum? I read that you run a lot of forums so thought you might know.

Jeremy (Last name omitted)
**********************
Hi Jeremy,

If your forum is fairly small you can use built in database backup features from the admin section. PHPMYADMIN also works, but only for smaller database sizes (it will time out with larger databases). I’m assuming you have a dedicated server and have a larger database.

I have several forums with over 100,000 member entries, so the built in MySQL backups and PHPMYADMIN don’t work for those. You’ll have to buckle down and use your command prompt via SSH.

A good SSH program is WINSCP – You can find it easily via Google or currently at download.com

SSH into your server, open the command prompt:
1. Change to the bin subdirectory in the directory where MYSQL is installed
For instance, typd cd /urs/local/mysql/bin

2. Type the following:
mysqldump –user=accountname –password=password databasename >path/backupfilename

*********

accountname – is the name of the MySQL account that you’re using to back up the database

password – is the password for the account

databasename – is the name of the database that you want to back up

path/backupfilename – is the path to the directory where you want to store the backups and the name of the file that the SQL output will be stored in.

May seem a little confusing, but you’ll get used to it real quick.

Leave a Reply

Your email address will not be published. Required fields are marked *