Federated Storage Engine Description
The federated storage Engine allows you to access a remote MySQL database without using replication or cluster technology (similar to Oracle's Dblink), using the Federated Storage Engine's table, locally storing only the table's structure information, The data is stored on the remote database, and the data retrieved from the remote library is returned locally at query time by the connector specified when the table was built.
Federated storage Engine is not enabled by default if the source code is used, you need to use the CMake plus dwith_federated_storage_engine option. if it is a binary package, specify the [--federated] option on start MySQL or the [mysqld] section in the my.cnf file to add the federated parameter
Federated Storage Engine Architecture
1 the table for the local server federated storage engine only holds the. frm structure file for the table 2 The remote server holds the. frm and data Files 3 Additions and deletions the operation is to access the remote database through the established connection and return the result to local.
4 The storage engine for remote data tables is a MySQL-supported storage engine, such as Myisam,innodb
Federated Storage Engine Operation steps
How to : Remote library: Turn on the Federated storage Engine establish permissions for remote access users to grant access to Objects local library: test whether the remote library Firewall problem SELinux issue create federated Table query succeeded
Remote Libraryturn on the Federated storage Engine
(Root@localhost)[(None)]>show engines;+--------------------+---------+----------------------------------------------------------------+------------- -+------+------------+|Engine|Support|Comment|Transactions|Xa|Savepoints|+--------------------+---------+----------------------------------------------------------------+------------- -+------+------------+|MyISAM|YES|MyISAM Storage Engine|NO|NO|NO||Csv|YES|CSV Storage Engine|NO|NO|NO||Performance_schema|YES|PerformanceSchema |NO|NO|NO||Blackhole|YES| /Dev/NULLStorage engine (anything you write toIt disappears)|NO|NO|NO||MEMORY|YES|Hash based, storedinchMemory, useful for TemporaryTables|NO|NO|NO||InnoDB| DEFAULT |Supports transactions, row- LevelLocking and ForeignKeys|YES|YES|YES||ARCHIVE|YES|Archive Storage Engine|NO|NO|NO||Mrg_myisam|YES|Collection ofIdentical MyISAM tables|NO|NO|NO||Federated|YES|Federated MySQL Storage Engine|NO|NO|NO|+--------------------+---------+----------------------------------------------------------------+------------- -+------+------------+
The use of the MySQL federated storage Engine