Posted by Eric H. on 03/16/07 23:01
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.
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
Navigation:
[Reply to this message]
|