Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar Mark Forums Read
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 06-03-2003, 04:17 PM   #1
Tipsy
Confirmed User
 
Join Date: Jul 2001
Location: See sig
Posts: 6,989
Simple MySQL problem

I want to copy the entire contents of a database on the same server, using the same host, user etc to a new database with a different name. Is there an easier way to do it rather than backing it up and restoring it with a new name?
__________________
Ignorance is never bliss.
Tipsy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-03-2003, 04:22 PM   #2
JDog
Confirmed User
 
Join Date: Feb 2003
Location: Canby, OR
Posts: 7,453
do you have root to the box? because you should just be able to just copy the db files into the directory of mysql under the new DB name! That should be it.

jDoG
__________________
NSCash now powering ReelProfits.com
ALSO FEATURING: NSCash.com :: SoloDollars.com :: ReelProfits.com :: BiminiBucks.com :: VOD
PROGRAMS COMING SOON: Greedy Bucks :: Vengeance Cash
NOW OFFERING OVER 60 SITES
CONTACT :: JAMES SMITH :: CHIEF TECHNOLOGY OFFICER :: ICQ (711385133)
JDog is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-03-2003, 04:23 PM   #3
cash69
So Fucking Banned
 
Join Date: Oct 2002
Location: chandler, az
Posts: 1,052
c:\winnt\system32\msql\ copy those.. duno about linux
cash69 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-03-2003, 04:28 PM   #4
Tipsy
Confirmed User
 
Join Date: Jul 2001
Location: See sig
Posts: 6,989
Quote:
Originally posted by JDog
do you have root to the box? because you should just be able to just copy the db files into the directory of mysql under the new DB name! That should be it.

jDoG
Now that's almost too obvious I'll give it a try and if it works thanks.
__________________
Ignorance is never bliss.
Tipsy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-03-2003, 04:28 PM   #5
blazin
Confirmed User
 
Join Date: Aug 2002
Posts: 2,781
Hi Tipsy

Assuming your using unux or similiar try this:

mysqldump -u DBUSER DBNAME -p > dbdump.sql


then run your db client and type >

create database NEWDBNAME;

exit the client then do this

mysql -u DBUSER NEWDBNAME -p < dbdump.sql

(of course replacing the italics with your db details)

Hope that helps
blazin is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-03-2003, 04:32 PM   #6
Tipsy
Confirmed User
 
Join Date: Jul 2001
Location: See sig
Posts: 6,989
Quote:
Originally posted by blazin
Hi Tipsy

Assuming your using unux or similiar try this:

mysqldump -u DBUSER DBNAME -p > dbdump.sql


then run your db client and type >

create database NEWDBNAME;

exit the client then do this

mysql -u DBUSER NEWDBNAME -p < dbdump.sql

(of course replacing the italics with your db details)

Hope that helps
Thanks blazin - only way I know how to do it. Just wodering if there was a quicker/easier way.
__________________
Ignorance is never bliss.
Tipsy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-03-2003, 04:38 PM   #7
vending_machine
Confirmed User
 
Join Date: Jun 2002
Location: Seattle
Posts: 1,062
Quote:
Originally posted by Tipsy


Thanks blazin - only way I know how to do it. Just wodering if there was a quicker/easier way.
Quote:
mysqladmin -uUSER -pPASSWORD create NEWDATABASE
mysqldump -uUSER -pPASSWORD --no-create-db --quick DATABASE | mysql -uUSER -pPASSWORD NEWDATABASE
Pretty quick and easy..
vending_machine is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-03-2003, 04:40 PM   #8
blazin
Confirmed User
 
Join Date: Aug 2002
Posts: 2,781
Quote:
Originally posted by Tipsy


Thanks blazin - only way I know how to do it. Just wodering if there was a quicker/easier way.
No problem.

I always use this method myself....
I think there is a simpler way but without my manual I'm clueless
blazin is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-03-2003, 04:41 PM   #9
blazin
Confirmed User
 
Join Date: Aug 2002
Posts: 2,781
Pure genius Vending Machine

I'm taking notes..........
blazin is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks
Thread Tools



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.