从本地数据库django导入后出现MySQL语法错误

时间:2017-08-19 16:10:15

标签: python mysql django

我使用本地服务器和本地安装的mysql开发了我的站点和数据库。现在我正在设置一个实际的服务器,现在我想导出我的本地数据库并通过phpmyadmin导入我给出了这个错误:

SQL query:



CREATE TABLE `account_emailconfirmation` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `created` datetime(6) NOT NULL,
  `sent` datetime(6) DEFAULT NULL,
  `key` varchar(64) NOT NULL,
  `email_address_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `key` (`key`),
  KEY `account_ema_email_address_id_5b7f8c58_fk_account_emailaddress_id` (`email_address_id`),
  CONSTRAINT `account_ema_email_address_id_5b7f8c58_fk_account_emailaddress_id` FOREIGN KEY (`email_address_id`) REFERENCES `account_emailaddress` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
MySQL said: Documentation

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(6) NOT NULL,
  `sent` datetime(6) DEFAULT NULL,
  `key` varchar(64) NOT NULL,' at line 3 

有什么不对? 我试图排除这个特定的表,但我对其他一些表也有同样的错误。

版本: mysql local:5.7 网上的mysql:5.5

0 个答案:

没有答案