Fedora Linux Support Community & Resources Center
  #1  
Old 6th May 2008, 07:02 PM
ear9mrn Offline
Registered User
 
Join Date: Aug 2007
Posts: 7
Mysql Transfer Record

Hi,

Not sure if this is the right place for this. I have a mysql server on two differnet machines on the same subnet. I would like to be able to transfer a single record from one database table on one machine to an identical table on the other machine based on some criteria (eg creation date). I have been looking at using something like mysqldump or outputing an xml file of the record. Looks like both are possible athough I have not determined the exact syntax for the script yet.

Just wanted to know if this is the best method or whether there is a better way of doing it ?

Some examples would be great.

Thanks,


Pete.
Reply With Quote
  #2  
Old 6th May 2008, 09:01 PM
ear9mrn Offline
Registered User
 
Join Date: Aug 2007
Posts: 7
OK I manage to answer my own question.....

/usr/bin/mysql -h hostname -u username --password=password -e "select * from database.table where columname='something';" > tempfile.tmp

You have to ensure the user has the correct permissions to login from a host other than localhost. This is easy to check and fix if you have phpMyAdmin running.

and to load the record.

/usr/bin/mysqlimport -h hostname -u USERNAME -pPASSWORD -v database tempfile.tmp


Hope this is useful to someone else.

Pete.
Reply With Quote
Reply

Tags
mysql, record, transfer

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Record VLC Andrew James Using Fedora 0 15th January 2009 09:11 PM
SPF record ls-l Servers & Networking 4 31st July 2008 03:19 PM
lp record to mp3 Dimoutlook Using Fedora 2 28th December 2006 06:51 PM
MX Record trinimoses Using Fedora 1 8th July 2005 05:21 AM
DVD ISO Record INIGOTEJERA Installation and Live Media 8 28th June 2005 02:01 PM


Current GMT-time: 19:27 (Saturday, 25-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat