错误上传wordpress网站的.sql文件

时间:2016-10-28 13:35:12

标签: mysql sql wordpress phpmyadmin mysql-error-1064

这是错误

1064 - 您的SQL语法出错;检查与您的MySQL服务器版本对应的手册,以便在“AS ical subscribe access key附近使用正确的语法,

created_on datetime DEFAULT NULL,   在第20行“更新”

ERREUR 请求SQL:

-- --------------------------------------------------------
--
-- Structure de la table `pec_calendars`
--
CREATE TABLE  `pec_calendars` (

 `id` INT( 11 ) UNSIGNED NOT NULL ,
 `type` ENUM(  'user',  'group',  'url' ) DEFAULT  'user',
 `user_id` INT( 11 ) UNSIGNED DEFAULT NULL ,
 `name` VARCHAR( 100 ) DEFAULT NULL ,
 `description` TEXT,
 `color` VARCHAR( 7 ) DEFAULT NULL ,
 `admin_id` INT( 11 ) DEFAULT NULL ,
 `status` ENUM(  'on',  'off' ) DEFAULT  'on',
 `show_in_list` ENUM(  '0',  '1' ) DEFAULT NULL ,
 `public` TINYINT( 3 ) UNSIGNED DEFAULT  '0',
 `reminder_message_email` TEXT,
 `reminder_message_popup` TEXT,
 `access_key` VARCHAR( 32 ) DEFAULT NULL COMMENT AS  `ical subscribe access key` ,
 `created_on` DATETIME DEFAULT NULL ,
 `updated_on` DATETIME DEFAULT NULL
) ENGINE = INNODB DEFAULT CHARSET = utf8; 

1 个答案:

答案 0 :(得分:1)

猜猜你的查询应该是:

CREATE TABLE pec_calendars 
  ( 
     id                     INT(11) UNSIGNED NOT NULL, 
     type                   ENUM('user', 'group', 'url') DEFAULT 'user', 
     user_id                INT(11) UNSIGNED DEFAULT NULL, 
     name                   VARCHAR(100) DEFAULT NULL, 
     description            TEXT, 
     color                  VARCHAR(7) DEFAULT NULL, 
     admin_id               INT(11) DEFAULT NULL, 
     status                 ENUM('on', 'off') DEFAULT 'on', 
     show_in_list           ENUM('0', '1') DEFAULT NULL, 
     public                 TINYINT(3) UNSIGNED DEFAULT '0', 
     reminder_message_email TEXT, 
     reminder_message_popup TEXT, 
     access_key             VARCHAR(32) DEFAULT NULL, 
     created_on             DATETIME DEFAULT NULL, 
     updated_on             DATETIME DEFAULT NULL 
  ) 
engine = innodb 
DEFAULT charset = utf8;