Tioma
Tioma

Reputation: 2150

Is is possible to create a FEDERATED on VIEW for mysql

How can I create a FEDERATED on VIEW which placed on remote server? I'm using MySQL.

Upvotes: 9

Views: 10538

Answers (1)

Ike Walker
Ike Walker

Reputation: 65567

Yes, you can create a FEDERATED table on a VIEW.

Here's a simple example:

create table t_table (
id int not null auto_increment primary key
) engine = innodb;

create or replace view v_view as select * from t_table;

create table f_fed_table (
id int not null
) ENGINE=FEDERATED CONNECTION='mysql://user:[email protected]:3306/test/v_view';

Upvotes: 21

Related Questions