Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

copy tables 1

Status
Not open for further replies.

hz

Programmer
Oct 2, 2000
29
US
Does anybody know, in MYSQL, how to copy an entire table in one database to another database? [sig][/sig]
 
yea ,
just shut down the server , and copy the databse files
into another directory . remember that a database in
mysql is a directory. so if you copy the director and
give it a new name, you'll have a exact duplicate database.

ie.
database "work".
% cp /path_to_data_files/work /path_to_data_files/mywork

now, when you start up mysql, you'll see "work" and "mywork"

cheers
[sig]<p>Ken<br><a href=mailto:admin@mysqlwebring.com>admin@mysqlwebring.com</a><br><a href= Webring</a><br>[/sig]
 
Thanks Ken. I will go ahead and test it after I gain the permission.

[sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top