Abhishek Mohandas
Abhishek Mohandas

Reputation: 61

How to copy a MySQL database from one computer to another?

Does anyone know of an easy way to copy a database from one computer to a file, and then import it on another computer?

I heard about "mysqldump" but i don't know how to use it and where the command to write. My database name is "lbry" username is "root".

please help me to find the solution...

Upvotes: 0

Views: 2152

Answers (2)

Erik Ekman
Erik Ekman

Reputation: 2066

Try something like this:

mysqldump -u root -p lbry > dump-lbry.sql

Then to import it:

mysql -u root -p < dump-lbry.sql

Upvotes: 1

Festus Tamakloe
Festus Tamakloe

Reputation: 11310

This best and the easy way is to use a db tools(SQLyog)

http://www.webyog.com/product/downloads

With this tools you can connect the 2 databases servers and just copy one database on server a to server b.

For more info

http://faq.webyog.com/content/12/32/en/mysql-5-objects-are-greyed-out-in-copy-db-to-other-host-dialogue.htmlenter image description here

Upvotes: 1

Related Questions