CREATE TABLE IF NOT EXISTS `game_session_2` ( `id` int(11) NOT NULL AUTO_INCREMENT, `app_id` varchar(36) NOT NULL, `app_version` varchar(5) NOT NULL, `mnc` varchar(10) NOT NULL, `os` int(1) NOT NULL, `os_version` varchar(10) NOT NULL, `device_model` varchar(100) NOT NULL, `s_time` datetime NOT NULL, `e_time` datetime NOT NULL, `session_length` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=FEDERATED DEFAULT CHARSET=utf8 CONNECTION='mysql://user:passwd@192.168.255.36:3306/game_stats_dev/game_session';
mysql> show engines;
+————+———+
| Engine | Support |
+————+———+
| ndbcluster | NO |
| MRG_MYISAM | YES |
| BLACKHOLE | YES |
| CSV | YES |
| MEMORY | YES |
| FEDERATED | NO |
| ARCHIVE | YES |
| InnoDB | YES |
| MyISAM | DEFAULT |
edit /etc/my.cnf and in the [mysqld] section, add the line:
federated
it’s equivalent to specifying –federated on the command line