MySQL Federated 엔진 테이블 만들기

입질쾌감 물때표
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

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다