In the previous list of articles, I have demonstrated FEDERATED storage engine to perform cross server queries between MySQL Servers.
In this post, I am showing to create the Connection Server and use that Server detail with multiple FEDERATED Table of MySQL.
Without a Connection server, we need to write the connection string in each and every FEDERATED table so when we have a multiple FEDERATED table which are using same remote connection information then I suggest you to create Connection Server once and use with all tables.
Below is a small demonstration.
First Create Server:
CREATE SERVER FederatedConnectionServer
FOREIGN DATA WRAPPER mysql
OPTIONS (USER 'UserName',password 'Password', HOST 'localhost', PORT 3306, DATABASE 'TestDB');
CREATE TABLE tbl_RemoteTable
Please share your ideas and opinions about this topic with me, your contribution will add true value to this topic.
If anyone has doubts on this topic then please do let me know by leaving comments or send me an email.
If you like this post, then please share it with others.
Please follow dbrnd.com, I will share my experience towards the success of Database Research and Development Activity.
I put up a post every day, please keep reading and learning.
Discover Yourself, Happy Blogging !
Anvesh M. Patel.