Easy way to copy record from local db and insert it into remote db?
Hi All, 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= Any help appreciated! Much warmth, Murray http://www.planetthoughtful.org Building a thoughtful planet, one snide comment at a time... * Worried that you might have missed something amazingly amazing on PlanetThoughtful? * Join the newsletter and then you'll know for certain you haven't! * http://www.planetthoughtful.org/html/ptnewsletter.php -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Question / suggestion re: mysqlhotcopy
Thanks Paul! Much appreciated. I'm sure this will be of help to others, particularly because to WinXP Perl neophytes like myself, you only get to find out mysqlhotcopy.pl won't work because of the "getpwuid" function after you go through solving how to get DBI.pm installed (which turned out to be relatively easy by PPM, of course, but finding THAT out wasn't 2nd-nature to a newbie like myself), because that's what falls over first, since it doesn't seem to be distributed with the ActiveState Perl 5.8 package. So, laugh, you fix that only to find you can't fix the next problem... Thanks again! Much warmth, Murray http://www.planetthoughtful.org Building a thoughtful planet, one snide comment at a time... -Original Message- From: Paul DuBois [mailto:[EMAIL PROTECTED] Sent: Saturday, 7 June 2003 10:54 AM To: Murray Wells; [EMAIL PROTECTED] Subject: Re: Question / suggestion re: mysqlhotcopy At 10:34 +1000 6/7/03, Murray Wells wrote: >Hi All, > >Apologies if this has been done to death previously, but would it be >sensible to indicate in the MySQL documentation that the Perl >mysqlhotcopy script only appears to work on the Linux platform? (Or, >more accurately, doesn't work on the WinXP platform, I have no idea >about other platforms) Done. > >At least, so it appears when attempting to get it to work on WinXP >using ActiveState Perl 5.8. It appears the "getpwuid" function is >unsupported in the Win32 implementation. > >Alternatively, if there's a known work-around, I'd love to hear about >it, and maybe that should go into the documentation instead? > >Much warmth, > >Murray >http://www.planetthoughtful.org >Building a thoughtful planet, >one snide comment at a time... -- Paul DuBois, Senior Technical Writer Madison, Wisconsin, USA MySQL AB, www.mysql.com Are you MySQL certified? http://www.mysql.com/certification/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Question / suggestion re: mysqlhotcopy
Hi All, Apologies if this has been done to death previously, but would it be sensible to indicate in the MySQL documentation that the Perl mysqlhotcopy script only appears to work on the Linux platform? (Or, more accurately, doesn't work on the WinXP platform, I have no idea about other platforms) At least, so it appears when attempting to get it to work on WinXP using ActiveState Perl 5.8. It appears the "getpwuid" function is unsupported in the Win32 implementation. Alternatively, if there's a known work-around, I'd love to hear about it, and maybe that should go into the documentation instead? Much warmth, Murray http://www.planetthoughtful.org Building a thoughtful planet, one snide comment at a time... -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Changing the server that is started by entry in Services in Windows XP?
Hi All, I recently downloaded and installed MySQL-3.23.55 for Windows XP. Previously I was running MySQL-3.23.53-max-nt, but now the Service entry that appears under the Services List under Administrative Tools runs 3.23.55-nt when started, when I would prefer it to run 3.23.55-max or 3.23.55-max-nt. I can't seem to edit the server this Service runs by clicking on its properties in the Services List. Can anyone tell me how I change which version of the server this Service runs when started? Following is the information from my my.ini file, if that's helpful. It certainly lists mysql-max.exe, but appears that's not what gets started when I start the service. #This File was made using the WinMySQLAdmin 1.4 Tool #29/01/2003 9:39:14 PM #Uncomment or Add only the keys that you know how works. #Read the MySQL Manual for instructions [mysqld] basedir=C:/mysql #bind-address=169.254.82.163 datadir=C:/mysql/data #language=C:/mysql/share/your language directory #slow query log#= #tmpdir#= port=3306 #set-variable=key_buffer=16M [WinMySQLadmin] Server=C:/mysql/bin/mysqld-max.exe user=[withheld] password=[withheld] Regards and best wishes, Murray Wells - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Writing program to communicate with remote internet MySQL server?
Hello All, For some time I've been wondering if it's possible to write a program that can automatically check my local MySQL server, create a recordset containing any new or updated records found in my local table(s) since the last check, and upload those new / updated records to the MySQL server my web site uses at phpwebhosting.com. My background is VB / VBA, but I also have access to Perl, Python and Ruby. I'm wondering if anyone can tell me if it's possible, using one of these languages, to connect to a remote MySQL server over the internet and to manipulate tables on the remote server as though they were recordset objects, similarly to how you might achieve this on a local server using MyODBC? The end goal is to develop a program I can fire as a Windows XP scheduled task to synchronize the remote database with the local one. Any help appreciated! Regards and best wishes, M Wells - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php