运行mysql脚本时出错

时间:2014-10-22 06:03:37

标签: mysql sql

我有一个mysql脚本来自其他一些电脑,它运行正常 当我在我的机器上运行时,同样的事情 它给出了错误

请看这个截图

如果我使用此日期' 1970-01-01 00:00:00'

其中一个错误是日期错误。它给出了错误 如果我使用此日期' 2000-01-01 00:00:00'

它开始工作..

任何想法可能是什么原因

脚本:

  DROP DATABASE IF EXISTS `dashboard2`;
  CREATE DATABASE IF NOT EXISTS `dashboard2` /*!40100 DEFAULT CHARACTER SET latin1 */;
  USE `dashboard2`;

- 表dashboard2.dmpfiles的转储结构 DROP TABLE IF EXISTS dmpfiles; CREATE TABLE IF NOT NOT EXISTS dmpfiles(   dbid int(10)NOT NULL AUTO_INCREMENT,   sig varchar(255)DEFAULT' 0',   eventid int(10)NOT NULL,   occurred时间戳NOT NULL DEFAULT' 1970-01-01 05:30:01',   version varchar(25)DEFAULT' 0',   stringid int(10)NOT NULL,   lastadj时间戳NOT NULL DEFAULT' 1970-01-01 05:30:01',   主要关键(dbid) )ENGINE = InnoDB AUTO_INCREMENT = 2 DEFAULT CHARSET = latin1;

- 转储表dashboard2.dmpfiles的数据:~1行(约)     从dmpfiles删除;    / *!40000 ALTER TABLE dmpfiles DISABLE KEYS /;    INSERT INTO dmpfilesdbidsigeventidoccurredversionstringidlastadj) VALUES     (1,'扫描仪版本(2.3.0 6/4/2014)',1,' 2014-06-13 14:25:31',' 2.3。 0',0,' 2014-10-20 17:52:00'); / !40000 ALTER TABLE dmpfiles ENABLE KEYS * /;

- 表dashboard2.properties的转储结构 DROP TABLE IF EXISTS properties; CREATE TABLE IF NOT NOT EXISTS properties(   pid int(10)NOT NULL AUTO_INCREMENT,   type varchar(15)NOT NULL DEFAULT' 0',   name varchar(15)NOT NULL DEFAULT' 0',   id varchar(15)NOT NULL DEFAULT' 0',   value varchar(50)NOT NULL DEFAULT' 0',   主要关键(pid) )ENGINE = InnoDB AUTO_INCREMENT = 25 DEFAULT CHARSET = latin1;

- 转储表dashboard2.properties的数据:~24行(约) 从properties删除; / *!40000 ALTER TABLE properties DISABLE KEYS /; INSERT INTO propertiespidtypenameidvalue)VALUES     (1,' db',' DbVersion',' 0',' 3'),     (2,' system',' timezone',' 0',' America / New_York'),     (3,' system',' classname',' 6',' new ip'),     (4,' system',' classname',' 17',' mac move'),     (5,' system',' classname',' 19',' mac change'),     (6,' system',' classname',' 20',' ip change'),     (7,' system',' classname',' 30',' admin move'),     (8,' system',' classname',' 35',' speed'),     (9,' system',' classname',' 101',' ping over'),     (10,' system',' classname',' 102',' bw over'),     (11,' system',' classname',' 103',' new ip'),     (12,' system',' classname',' 104',' move'),     (13,' system',' classname',' 107',' name change'),     (14,' system',' classname',' 108',' speed2'),     (15,' system',' classname',' 109',' ENETIP change'),     (16,' system',' classname',' 0',' reserved'),     (17,' system',' classname',' 0',' reserved'),     (18,' system',' classname',' 0',' reserved'),     (19,' system',' classname',' 0',' reserved'),     (20,' system',' classname',' 0',' reserved'),     (21,' system',' classname',' 0',' reserved'),     (22,' system',' classname',' 0',' reserved'),     (23,' db',' current.db',' 0',' 1'),     (24,' System',' tzoffset',' 0',' -14400000'); / !40000 ALTER TABLE properties ENABLE KEYS * /;

enter image description here

1 个答案:

答案 0 :(得分:0)

TIMESTAMP数据类型用于包含日期和时间部分的值。 TIMESTAMP的范围为'1970-01-01 00:00:01' UTC到'2038-01-19 03:14:07' UTC。

对于超出范围的时间戳数据类型,永远不会将默认值设置为“1970-01-01 00:00:00”。