mySQL help

Homerboy

Lifer
Mar 1, 2000
30,890
5,001
126
I know how to do it for tables and such, but I can't find away to make an exact copy (structure and data) for an entire database.

whats the SQL statement?

THanks
 

Modeps

Lifer
Oct 24, 2000
17,254
44
91
Do you have shell and root access?
(edit, wait... um, are you just creating a clone of the database on the same server? or just making a backup copy?)
 

Homerboy

Lifer
Mar 1, 2000
30,890
5,001
126
its my server... I have everything :)

I want the data on this server so I can experiment with it
I have database XYZ with tables a, b, c, d
I want to make the same idnetical a, b, c, d in XYZ_copy database
so I can experiment with that _copy DB while XYZ still runs its normal routine
 

Modeps

Lifer
Oct 24, 2000
17,254
44
91
alright, you can do it by just going into /var/lib/mysql as root and cp -rf dbname/ bkpdbname/
 

Homerboy

Lifer
Mar 1, 2000
30,890
5,001
126
Yeah
I just copied the db dir and renamed it "copy_"
(windows machine FYI)
:p

but thanks for the help.
noted for future reference!