If you're going to be doing much work with MySQL, it's probably a good idea to go ahead and get PHPMyAdmin (http://www.phpmyadmin.net
Now, this program may very well be installed already on your server if you are using a hosting provider of some sort. I use Bluehost.com, for instance, which uses the cPanel interface for administering my site. There is a section in there for working with MySQL, with a link to PHPMyAdmin.
Copying databases is a snap in PHPMyAdmin. Simply go to your old database, click Operations, and at the bottom of your screen there will be an option to copy the database. It sounds like you'll want to copy both structure and data.
So I think this is your best option. If you don't have this software, but you do have a good control panel, then you can do what ravenpl suggests. Create a new database, and then export old database, and import into new one. There will be a convenient interface for this.
Basically, you probably don't want to run a series of actual SQL commands yourself to do this. It is a pain. And these other interfaces are good and tested, and there's less risk of missing something in your copy.
Main Topics
Browse All Topics





by: ravenplPosted on 2005-09-06 at 22:56:09ID: 14834211
First You must think, if You need it to duplicate, maybe the programm should use shared db. But if not.
create new database
make dump of old database (backup)
restore/import it to the new one.
need help on howto? what access to the db You have (shell, phpmyadmin ...)?