报错: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist 因此当遇到Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist报错的时候需要从如下几个方面入手: 1、查看是不是有一些表不是MYISAM引擎的表,因为MERGE引擎只适用于MYISAM表 2、查看是不是在union的表中含有不存在的表。 3、查看是不是MERGE的时候引用了不在同一个库的表,并且该表没有指定数据库名字。 4、比较各个表的结构(索引、引擎、列、字符集等)是否一致。 MRG_MyISAM 引擎: CREATE TABLE `pvlogs_merge_test` ( `id` varchar(100) NOT NULL, `member_id` int(11) DEFAULT NULL, `jsession` int(11) DEFAULT NULL, `ip` bigint(20) DEFAULT NULL, `search_id` bigint(20) DEFAULT NULL, `info_id` bigint(20) DEFAULT NULL, `lastmodify` timestamp NULL DEFAULT NULL, `disc` int(11) NOT NULL, `status` int(11) NOT NULL DEFAULT '0' COMMENT 'When the page(html) is open ,this attribute will set 1', PRIMARY KEY (`id`), KEY `info_id` (`info_id`), KEY `member_id` (`member_id`), KEY `ip` (`ip`) ) ENGINE=MRG_MyISAM DEFAULT CHARSET=utf8 UNION=(`pvlogs_20170313`,`pvlogs_20170312`,`pvlogs_20170311`,`pvlogs_20170310`,`pvlogs_20170309`,`pvlogs_20170308`,`pvlogs_20170307`,`pvlogs_20170306`,`pvlogs_20170305`,`pvlogs_20170304`,`pvlogs_20170303`,`pvlogs_20170302`,`pvlogs_20170301`,`pvlogs_20170228`,`pvlogs_20170227`,`pvlogs_20170226`,`pvlogs_20170225`,`pvlogs_20170224`,`pvlogs_20170223`,`pvlogs_20170222`,`pvlogs_20170221`,`pvlogs_20170220`,`pvlogs_20170219`,`pvlogs_20170218`,`pvlogs_20170217`,`pvlogs_20170216`,`pvlogs_20170215`,`pvlogs_20170214`,`pvlogs_20170213`,`pvlogs_20170212`,`pvlogs_20170211`,`pvlogs_20170210`,`pvlogs_20170209`,`pvlogs_20170208`,`pvlogs_20170207`,`pvlogs_20170206`,`pvlogs_20170205`,`pvlogs_20170204`,`pvlogs_20170203`,`pvlogs_20170202`,`pvlogs_20170201`,`pvlogs_20170131`,`pvlogs_20170130`,`pvlogs_20170129`,`pvlogs_20170128`,`pvlogs_20170127`,`pvlogs_20170126`,`pvlogs_20170125`,`pvlogs_20170124`,`pvlogs_20170123`,`pvlogs_20170122`,`pvlogs_20170121`,`pvlogs_20170120`,`pvlogs_20170119`,`pvlogs_20170118`,`pvlogs_20170117`,`pvlogs_20170116`,`pvlogs_20170115`,`pvlogs_20170114`,`pvlogs_20170113`);