Re: How can I duplicate a mysql template database? [hack]

2002-12-17 Thread Joseph Bueno
day, December 17, 2002 2:47 AM >>To: [EMAIL PROTECTED] >>Subject: Re: How can I duplicate a mysql template database? [hack] >> >> >>Hi, >> >>There is an easier way to duplicate a database; from the comand >>line, you can run: >> >>mysqladmin

RE: How can I duplicate a mysql template database? [hack]

2002-12-17 Thread Daevid Vincent
IL PROTECTED] > Subject: Re: How can I duplicate a mysql template database? [hack] > > > Hi, > > There is an easier way to duplicate a database; from the comand > line, you can run: > > mysqladmin create db2 > mysqldump db1 | mysql db2 > > If you want to duplicate

Re: How can I duplicate a mysql template database? [hack]

2002-12-17 Thread Joseph Bueno
Hi, There is an easier way to duplicate a database; from the comand line, you can run: mysqladmin create db2 mysqldump db1 | mysql db2 If you want to duplicate the schema only (without the data): mysqladmin create db2 mysqldump --no-data db1 | mysql db2 (You may have to add host/user/password o

RE: How can I duplicate a mysql template database? [hack]

2002-12-17 Thread Daevid Vincent
Seems to me there should be a built in SQL command to duplicate a database. Jeepers. Or to read in a .sql file from PHP and create a database out of it (which was the original intent). Anyways, here's a 'hack'. I'd still love to hear anyone else's more elegant solution. $V2DB = "V2_SL".$CompanyID