jump to navigation

Backup your databases without phpmyadmind March 24, 2011

Posted by Tournas Dimitrios in Mysql.

I often read threads about export/import data from MySQL and it’s always mentioned phpmyadmin as the only way to do that (with PHP indeed).
But that’s not true, and it’s indeed the slower way to do that, expecially when importing large database files (because phpmyadmin has problems with large db)…
This would be just a reminder🙂

Use an SSH client, like putty (if your database is on a remote server), to connect to your server and export the databse you want simply with:

mysqldump  --user=username --password=1234 --databases your_database --opt --quote-names --allow-keywords --complete-insert | bzip2 -c > your_database.sql.bz2

download the .bz2 file created, unzip it using 7-zip (if you dont have any other uncompress utility), and backup your database in mysql using:

mysql --user=username --password your_database < your_database.sql

that’s faster than using “import” from phpmyadmin🙂

Link: http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html


1. kristian - November 1, 2011

ill try this one..

2. Clifford - February 26, 2014

I do agree with all of the ideas you’ve presented for your
post. They’re really convincing and will certainly work.
Nonetheless, the posts are very quick for starters.
Could you please lengthen them a bit from next time? Thank
you for the post.

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