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?
Subscribe to:
Post Comments (Atom)
4 comments:
Also you can use phpMyAdmin. Or just download the database from your hosting account, when speaking about websites on commercial hosting.
Eva from Iflexion
thanks a lot it may be useful for me,,,i need to use this trick...
hi. I saw your link from a Yahoo Answer about the domain ownership, can you help me about this problem please? I don't know where to put the snippet, please...
X-Byte Enterprise Solution is a leading blockchain, AI, & IoT Solution company in USA and UAE, We have expert Web & mobile app development services. A great piece that sheds much-needed light on merging technology and its impact on the business as there are many new details you posted here. Sometimes it is not so easy to build a "Web & Mobile App Development" without custom knowledge; here you need proper development skills and experience. However, the details you mention here would be very much helpful for the beginner. Here is yet another top-notch solution provider “X-Byte Enterprise Solutions” who render feasible and credible solutions to global clients.
Know more here: Web & Mobile App Development
Post a Comment