title: mysql version 5.5.27 report [Err] 1005 - Can't create table 'hgwechat-ms.customer_news' (errno: 150)
body: <p>I have 3 existed tables:"customer" "news" "hallplace",here is the code how I create them:</p>
  
  <pre><code>DROP TABLE IF EXISTS `customer`;
  CREATE TABLE `customer` (
    `id` varchar(32) COLLATE utf8_bin NOT NULL,
    ...
    PRIMARY KEY (`id`),
    ...
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
  
  DROP TABLE IF EXISTS `news`;
  CREATE TABLE `news` (
    `id` varchar(32) NOT NULL,
    ...
    PRIMARY KEY (`id`),
    ...
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  
  DROP TABLE IF EXISTS `hall_place`;
  CREATE TABLE `hall_place` (
    `id` varchar(32) NOT NULL,
    ...
    PRIMARY KEY (`id`),
    ...
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  </code></pre>
  
  <p>now i need to create a new table "customer_news":</p>
  
  <pre><code>CREATE TABLE `customer_news` (
    `id` varchar(32) COLLATE utf8_bin NOT NULL,
    ..
    `fk_customer_id` varchar(32) COLLATE utf8_bin DEFAULT NULL,
    `fk_news_id` varchar(32) COLLATE utf8_bin DEFAULT NULL,
    `fk_hallplace_id` varchar(32) COLLATE utf8_bin DEFAULT NULL,
    PRIMARY KEY (`id`),
    KEY `FK8037FE9466E72C39` (`fk_customer_id`),
    KEY `FK8037FE94B522885D` (`fk_news_id`),
    KEY `FK8037FE94255BE4D0` (`fk_hallplace_id`),
    CONSTRAINT `FK8037FE94255BE4D0` FOREIGN KEY (`fk_hallplace_id`) REFERENCES `hall_place` (`id`),
    CONSTRAINT `FK8037FE9466E72C39` FOREIGN KEY (`fk_customer_id`) REFERENCES `customer` (`id`),
    CONSTRAINT `FK8037FE94B522885D` FOREIGN KEY (`fk_news_id`) REFERENCES `news` (`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
  </code></pre>
  
  <p>it's work well on mysql version5.6,but on mysql 5.5,error shows:</p>
  
  <blockquote>
    <p>[Err] 1005 - Can't create table 'hgwechat-ms.customer_news' (errno: 150)</p>
  </blockquote>
  
  <p>^_^ this is my first time using stackworkflow,i dont konw how to format.</p>