Backup and restore MySQL tables/database
If you have a lagre database that you will take backup on you might find it hard to do so with example phpmyadmin. MySQL made commando for this so you easy can do this in your terminal on both Windows and Linux. I will first go with Linux. OBS: The commando are the same for both Linux and Windows.
MySQLdump commando
mysqldump -u username -ppassword database_name table_name > /your/way/to/sql/file/file_name.sql
SQL for restore table/database
mysql -u username -ppassword database_name < /your/way/to/sql/file/file_name.sql
If you want to backup full database just dont write the table name on first commando.
If you use Windows you have to go to you bin folder who is in your mysql folder. For example in EasyPHP the way is:
c:\program\easyphp-folder\mysql\bin
From there run the commando. Also if you did not understand, you first run the location in simple CMD and then run the commando.
2 Responses to “Backup and restore MySQL tables/database”
March 16th, 2010 saat: 6:26 am
[...] the rest here: Jens Olsson » Blog Archive » Backup and restore MySQL tables/database Posted in Uncategorized | Tags: find-it-hard, lagre-database, made-commando, terminal, [...]
May 26th, 2010 saat: 3:57 pm
СПС.…
Я тут…
Leave a Reply