sql导入错误,默认值无效

时间:2017-10-18 15:03:45

标签: mysql google-cloud-platform

我有谷歌问题我想我不是sql的专家那就是为什么我似乎无法解决它。

我从专用服务器导出数据库并尝试导入到谷歌云实例apache / sql 即使我在stackoverflow中尝试了所有答案

,我也会收到如下错误
Error
SQL query:


CREATE TABLE `islemler` (
  `islemID` int(11) NOT NULL,
  `islemKullaniciID` int(11) NOT NULL,
  `islemTarih` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `islemBitisTarihi` datetime DEFAULT NULL,
  `islemDurum` varchar(500) COLLATE utf8_turkish_ci NOT NULL,
  `islemNot` varchar(500) COLLATE utf8_turkish_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_turkish_ci
MySQL said: Documentation

1067 - ' islemTarih'

的默认值无效

请参阅链接屏幕截图 Old database

New Database error

我感谢一些帮助...

另外

我设法创建所有表格手册,就像我的sql知识一样。 我在命令下运行 CREATE TABLE oradamis_vtislemlerislemID INT(11)NOT NULL,islemKullaniciID INT(11)NOT NULL,islemTarih DATETIME NOT NULL,{{1 DATETIME NOT NULL,islemBitisTarihi VARCHAR(500)CHARACTER SET utf8 COLLATE utf8_turkish_ci NOT NULL,islemDurum VARCHAR(500)CHARACTER SET utf32 COLLATE utf32_turkish_ci NOT NULL)ENGINE = InnoDB;

CREATE TABLE islemNotoradamis_vtkullanicilar INT(11)NOT NULL,kullaniciID VARCHAR(250)CHARACTER SET utf8 COLLATE utf8_turkish_ci NOT NULL,{{1} } VARCHAR(250)CHARACTER SET utf8 COLLATE utf8_turkish_ci NOT NULL,username VARCHAR(100)CHARACTER SET utf8 COLLATE utf8_turkish_ci NOT NULL,password VARCHAR(100)CHARACTER SET utf8 COLLATE utf8_turkish_ci NOT NULL,{{1 VARCHAR(100)CHARACTER SET utf8 COLLATE utf8_turkish_ci NOT NULL,kullaniciAdi VARCHAR(100)CHARACTER SET utf8 COLLATE utf8_turkish_ci NOT NULL,kullaniciPozisyon VARCHAR(100)CHARACTER SET utf8 COLLATE utf8_turkish_ci NOT NULL,{{ 1}} VARCHAR(100)CHARACTER SET utf8 COLLATE utf8_turkish_ci NOT NULL)ENGINE = InnoDB;

CREATE TABLE kullaniciSkypekullaniciMailkullaniciTelefon INT(11)NOT NULL,kullaniciYetki VARCHAR(250)CHARACTER SET utf8 COLLATE utf8_turkish_ci NOT NULL,{{1} } VARCHAR(100)CHARACTER SET utf8 COLLATE utf8_turkish_ci NOT NULL)ENGINE = InnoDB;

但是当我尝试从旧SQL导入时,会出现同样的启动错误。

非常沮丧:(

1 个答案:

答案 0 :(得分:0)

尝试替换为:

CREATE TABLE islemler ( islemID int(11) NOT NULL, islemKullaniciID int(11) NOT NULL, islemTarih timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, islemBitisTarihi datetime DEFAULT NULL, islemDurum varchar(500) COLLATE utf8_turkish_ci NOT NULL, islemNot varchar(500) COLLATE utf8_turkish_ci NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_turkish_ci MySQL said: Documentation