pma_history创建错误

时间:2012-08-01 16:33:48

标签: mysql sql phpmyadmin

从文档中,我正在创建pma_history表。

这是scripts/create_tables.sql失败的唯一部分:

CREATE TABLE IF NOT EXISTS `pma_history` (
  `id` bigint(20) unsigned NOT NULL auto_increment,
  `username` varchar(64) NOT NULL default '',
  `db` varchar(64) NOT NULL default '',
  `table` varchar(64) NOT NULL default '',
  `timevalue` timestamp(14) NOT NULL,
  `sqlquery` text NOT NULL,
  PRIMARY KEY  (`id`),
  KEY `username` (`username`,`db`,`table`,`timevalue`)
)
  ENGINE=MyISAM COMMENT='SQL history for phpMyAdmin'
  DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;

这就是服务器所说的:

#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 '(14) NOT NULL, `sqlquery` text NOT NULL, PRIMARY KEY (`id`), 
KEY `user' at line 6

1 个答案:

答案 0 :(得分:2)

保留timestamp列的长度

`timevalue` timestamp NOT NULL
  

在4.1版之前,MySQL检索并显示TIMESTAMP值的格式取决于显示大小

取自here