WordPress Backup using MYSQL commands
If you would like to backup large database phyMyAdmin will not going to handle large database so best by using straight MySQL Commands you can backup your data. Here is the steps;
phpMyAdmin can not handle large databases so using straight MySQL code will help.
1. Change your directory to the directory you want to load things to:
user@linux:~> cd files/blog
2. Use mysqldump to dump all database tables. To dump only certain tables from the database, give their names at the place shown by (tablename tablename tablename), and omit the parentheses ( ) in any case. (For help, try: man mysqldump.):
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)
user@linux~/files/blog>
Example:
mysqldump –add-drop-table -h db01.example.net -u dbocodex -p dbwp | bzip2 -c > blog.bak.sql.bz2
Enter password: my-password
user@linux~/files/blog>
The bzip2 -c after the | (pipe) means the backup is compressed on the fly, and the > blog.bak.sql.bz2 sends the bzip output to a file named blog.bak.sql.bz2. It does in one line the same thing that these two commands do:
mysqldump –add-drop-table -h db01.example.net -u dbocodex -p dbwp > blog.bak.sql
bzip2 blog.bak.sql
Mac Wilson likes to keep himself as well as keep others updated about new technologies emerging in WordPress Hosting and MySQL Hosting.