Anyone know of a PHP script that will clone an entire MySQL database to another on another server? As a sort of backup?
2
-
I guess what I'm really looking for is something that will automatically detect teh number of tables, rows in each table, and then loop through them all, and do the appropriate create operation on a remote database.(Automatically) If so where do I get it, or ahow do I make phpMyAdmin do it?TechplexEngineer– TechplexEngineer2010-09-19 01:42:37 +00:00Commented Sep 19, 2010 at 1:42
-
1You could adjust this: electrictoolbox.com/php-script-backup-copy-mysql-tablemiku– miku2010-09-19 01:42:42 +00:00Commented Sep 19, 2010 at 1:42
Add a comment
|
3 Answers
phpMyAdmin does this very well. Of course, if you had shell access, try this instead:
mysqldump -u [username] -p [password] [database] > [filename]
2 Comments
TechplexEngineer
I am not quite sure what to do with that.
Sumith Harshan
It created file.But there are no any data. 0 bytes. Can you help me.
You can refer this link. -
http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html
This page is titled
MYSQL DUMP — A Database Backup Program
It contains all the details.
Hope this helps you.