Federated Storage Engine (FSE) allows you to connect to a remote server and “mount” a table on your local server, which links to the data on the remote server, for read-only access.

 

$ mysql -u root -ppassword -h remote

mysql> CREATE DATABASE test;

mysql> use test;

mysql> CREATE TABLE drivers (id INT,name VARCHAR(100));

mysql> INSERT INTO drivers (id, name) VALUES (1, ‘Chris’);

mysql> INSERT INTO drivers (id, name) VALUES (2, ‘Sheeri’);

mysql> INSERT INTO drivers (id, name) VALUES (3, ‘Elie’);

mysql> select * from drivers;

+------+--------+
| id   | name   |
+------+--------+
|    1 | Chris  |
|    2 | Sheeri |
|    3 | Elie   |
+------+--------+
3 rows in set (0.08 sec)

mysql> exit;
$ mysql -u root -ppassword -h local

mysql> CREATE DATABASE test;

mysql> use test;

mysql> CREATE TABLE drivers (id INT,name VARCHAR(100)) ENGINE=FEDERATED
CONNECTION=’mysql://root:password@remote:3306/test/drivers’;

mysql> select * from drivers;

+------+--------+
| id   | name   |
+------+--------+
|    1 | Chris  |
|    2 | Sheeri |
|    3 | Elie   |
+------+--------+
3 rows in set (0.14 sec)

mysql> exit;

 

Enjoy FSE tables!

 

Bye! Thanks for all the fish!

christos@themysqlguy.com

I wanted to let you know all about a blog and podcast I have been reading/listening to lately. Its called OurSQL and the author is Sheeri Kritzer.I have been in email contact with Sheeri and she seems like a really great person. Why wouldn’t she be? She’s a MySQL DBA after all! The self proclaimed “She-BA”.

 

Check out her blog at sheeri.net and her Podcast OurSQL on iTunes.