How to copy MySQL database from one computer / server on the other?
The short answer, you can copy the database from one computer / server to another using ssh or mysql client.
You can run all above 3 teams in a single pass using mysqldump and mysql commands (unsafe way, use only if you use a VPN network or task):
mysqldump $ db-name | mysql-h remote.box.com DB-name
Using ssh, if you do not have direct access to the remote server mysql (safest method):
mysqldump $ db-name | ssh user@remote.box.com mysql database name
You can simply copy the table named foo in the remote database (mysql and remote server remote.box.com) called the bar through the same syntax:
$ mysqldump DB-name foo | ssh user@remote.box.com mysql bar
This will not only save time, but you can impress your friend too;). Almost all commands can be executed using pipes under UNIX / Linux oses.
for easy way, create the batch file, for windows like the following:
cd \ your_mysql_bin_folder
mysqladmin-u root - password = create test_backup
mysqldump u root - password = test | mysql-u root - password = test_back
Wednesday, February 27, 2008
How to copy MySQL database from one computer / server on the other?
Diposting oleh Jage di 10:02 AM 4 komentar
Categorys: MySQL
Monday, January 7, 2008
Delphi PHP
I have already post about php which is like delphi, I have made some changes, you can download it for free here .
And please review to make it perfect.
Diposting oleh Jage di 4:32 PM 2 komentar
Categorys: PHP
Subscribe to:
Posts (Atom)