Backup of Mysql database without Using PhpMyAdmin

Started by Sudhakar, May 24, 2009, 09:56 PM

Previous topic - Next topic


phpMyAdmin has some file size limits so if you have large databases it may not be possible

to backup using phpMyAdmin. Then you have to use the command line tools that comes with

Mysql. Please note that this method is untested.

Mysql backup without phpMyAdmin
PHPMyAdmin can't handle large databases. In that case straight mysql code will help.

1. Change your directory to the directory you want to dump things to:

user@linux:~> cd files/blog
2. Use mysqldump (man mysqldump is available):

user@linux:~/files/blog> mysqldump --add-drop-table -h mysqlhostserver
-u mysqlusername -p databasename (tablename tablename tablename) | bzip2
-c > blog.bak.sql.bz2

Enter password: (enter your mysql password)
mysqldump --add-drop-table -h -u dbocodex -p dbwp | bzip2 -c >


Enter password: my-password

The bzip2 -c after the pipe | means the backup is compressed on the fly.