Posted by mick white on 03/17/07 23:56
Eric H. wrote:
> I know this has likely been asked a million times so I'm gonna keep it
> brief.
>
> 1. I'm in need of creating clones of a database I'm using as a template.
>
> 2. I've got a dump that I'm currently using "exec('mysql -p dbname
> <dump.sql')" to clone but I'm looking for a more elegant way of doing this.
mysqldump -u username -ppassword databasename [tablename(s)]
Mick
>
> 3. I do NOT need a program like phpmyadmin or bigdump to do the
> importing. I'm simply attempting to find a more elegant way to do this
> in my script that is handling other features for me as well.
>
>
> 4. In the past(read early this morning) I managed to read the dump file,
> remove the comments, explode it at the ";" to separate into individual
> queries and build the table structure with this but I cannot get it
> populate the tables with the data in the dump.
>
> I'd LOVE to simply be able to copy the database like phpmyadmin does but
> there doesn't seem to be an easy solution for that though earlier I saw
> something about a replication master/client that seemed close but I
> couldn't find enough about it...if that's the way to go, just tell me
> and I'll do my reading.
>
> All I need are pointers to where to find the info since most of the
> links I've found are for end users and not programmers.
>
>
> Thanks for reading this and for any pointers you may have.
>
> Eric
[Back to original message]
|