Menu:

Sponsor

Discover Master of Alchemy, our first iPad/iPhone and iPod touch game!

Follow Me

 

Forum's topics

Latest Files

Archives

Top Rated

Categories

Photo Gallery


Alessandro Crugnola on April 6, 2006 in general , php

Backup your batabases w/o phpmyadmin

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

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

 

Bookmark and Share

 

Tags: backup , mysql , mysqldump , phpmyadmin 

 



Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)


Type the characters you see in the picture above.





 

TrackBacks

TrackBack URL for this entry: http://www.sephiroth.it/cgi-bin/mt/mt-tb.cgi/6