"Murray Wells" <[EMAIL PROTECTED]> wrote:
>
> I have a local MySQL db (4.0.12) which I use for developing content for
> my web site, and my remote website MySQL db (3.23.56) which powers my
> site.
>
> I spend a fair amount of time synching individual records from my local
> db to my remote db (i.e. either inserting them into the remote db or
> updating them if they already exist and I have released changes to the
> record(s) in question) and I have written a fairly complex (for me) PHP
> script that handles this.
>
> But I'm wondering if I'm overlooking something simpler?
>
> I'm not really looking for replication, because I don't want all of the
> local content to be replicated to the remote db, only those records I
> release for actual publication. I'm wondering more along the lines of if
> there's a way to feed an insert statement run against my remote db in a
> window in SQLYog (3.11, the GUI I currently use) using data returned
> from a select statement run against my local db?
>
> Something conceptually like:
>
> INSERT INTO `remotedb`.`tbldata` SELECT * FROM `localdb`.`tbldata` WHERE
> recid=9999
You can use SELECT .. INTO OUTFILE and the LOAD DATA commands:
http://www.mysql.com/doc/en/SELECT.html
http://www.mysql.com/doc/en/LOAD_DATA.html
You can also make a dump file with --where option of mysqldump:
http://www.mysql.com/doc/en/mysqldump.html
--
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Victoria Reznichenko
/ /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED]
/_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net
<___/ www.mysql.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]