跨库连接mysql

需要开启FEDERATED 存储引擎

SHOW VARIABLES LIKE '%plugin%'

没有的话需要现下载放到文件夹下

然后
install plugin FEDERATED soname 'ha_federated.so';

SHOW ENGINES;

CREATE TABLE ggss (
id int(11) NOT NULL AUTO_INCREMENT,
wfid varchar(10) DEFAULT '',
rectime timestamp NULL DEFAULT NULL,
power int(11) DEFAULT NULL,
maxpower int(11) DEFAULT NULL,
pw_ag int(11) DEFAULT NULL,
PRIMARY KEY (id)
) ENGINE=FEDERATED DEFAULT CHARSET=utf8mb4 CONNECTION='mysql://gg:[email protected]:3307/base_db/ggss';

猜你喜欢

转载自blog.51cto.com/11103985/2336493
今日推荐