If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Mirroring a table from one db to another

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-14-10, 15:39
cspgsl cspgsl is offline
Registered User
 
Join Date: Apr 2010
Posts: 2
Mirroring a table from one db to another

I'm a database rookie hence the question:

Can you mirror a table in one DB to reflect the contents of a table in another database on the same server?

Can this process be automated such that an addition to one table gets written to both?

Thanks
Reply With Quote
  #2 (permalink)  
Old 04-15-10, 02:45
it-iss.com it-iss.com is offline
Registered User
 
Join Date: Sep 2009
Location: San Sebastian, Spain
Posts: 620
Have you considered using triggers to do this type of work. If you trigger on insert, update or delete the code inside the trigger could perform the operation on both tables.

Another solution is to use replication but this is more complex to perform, setup and maintain.
__________________
Ronan Cashell
Senior Oracle/MySQL DBA
http://www.it-iss.com
Reply With Quote
  #3 (permalink)  
Old 04-15-10, 05:52
cspgsl cspgsl is offline
Registered User
 
Join Date: Apr 2010
Posts: 2
Quote:
Originally Posted by it-iss.com View Post
Have you considered using triggers to do this type of work. If you trigger on insert, update or delete the code inside the trigger could perform the operation on both tables.
Another solution is to use replication but this is more complex to perform, setup and maintain.
Thanks, I hadn't considered that (didn't know about it really). I have found a couple of tutorials on the subject and will give it a go.
Reply With Quote
Reply

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On