PDA

View Full Version : Copy DB in mysql


Mansour
Sat 8th Jan '05, 10:18am
Hi
I would like to ask about the command that used to copy DB. For example I have a DataBase caled vb1, and I want to copy the data to vb2 DataBase, How can I do it using telnet.

what I did is to export the vb1 to sql file and then import the file to the vb2.

I thing there is one command that do this, do you know it ?

Thanks

Floris
Sun 9th Jan '05, 5:51am
Backing Up The Database via SSH/Telnet (http://www.vbulletin.com/docs/html/main/maintenance_ssh_backup)Restoring The Database via SSH/Telnet (http://www.vbulletin.com/docs/html/main/maintenance_ssh_restore)

Mansour
Thu 13th Jan '05, 2:53am
Hi,

I think you do not understand me.

What I'm asking about is to copy the one DB to other DB directly, no need to create the SQL file first.

The DB size is big and I don't have enough space to make two copy of DB1 in the same time (one SQL file, and other is the DB2).



In other words what I want is command like this:

mysqldump --opt -u dbusername -p databasename1 > databasename2

Thanks Floris

JimF
Thu 13th Jan '05, 11:29am
I'm not familiar with mysqlhotcopy but I believe that does what you're asking.