MySQL Forums
Forum List  »  Merge Storage Engine

Re: how to merge 2 tables from 2 different database?
Posted by: Lionel Farr
Date: August 28, 2006 04:10PM

Hello,

So if i have 3 databases, on a file system, like so:

/var/lib/mysql/mydb
/var/lib/mysql1/mydb
/var/lib/mysql2/mydb

how would the create be...this is what i have, doesn't seem to work...(this is on the default mysql intance)
create ...
) ENGINE=MERGE UNION=('/var/lib/mysql1/mydb/my_table','/var/lib/mysql2/mydb/my_table');

with or without the quotes...i get a syntax error...specifically ERROR 1103 (42000) at line 357: Incorrect table name

Do i need to somehow define the other 2 dbs to the mysql intance im creating the merge table on? How do i reference the other tables correctly?

I cant find any documentation on this syntax...please point me in the right direction.

Thanks,
L



Edited 1 time(s). Last edit at 08/28/2006 05:43PM by Lionel Farr.

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.