TIMESTAMP无效且#1064错误

时间:2013-06-03 06:23:00

标签: mysql mysqli phpmyadmin

从我的wamp服务器上的PHP管理员导出并导入我的灯服务器 - phpmyadmin也是。

我得到的第一个错误#1067 - Invalid default value for 'datetime'然后我将CURRENT_TIMESTAMP更改为TIMESTAMP,现在我收到以下错误:#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 ' link varchar(512) CHARACTER SET latin1 COLLATE latin1_general_cs NOT NULL, ' at line 14

这是我文件的第一个块:

-- phpMyAdmin SQL Dump
-- version 3.5.8.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jun 04, 2013 at 12:32 AM
-- Server version: 5.6.11-log
-- PHP Version: 5.4.14

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

--
-- Database: `feed_store`
--

-- --------------------------------------------------------

--
-- Table structure for table `feed`
--

CREATE TABLE IF NOT EXISTS `feed` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(512) CHARACTER SET latin1 COLLATE latin1_general_cs NOT NULL,
  `datetime` datetime NOT NULL DEFAULT TIMESTAMP,
  `link` varchar(512) CHARACTER SET latin1 COLLATE latin1_general_cs NOT NULL,
  `category` varchar(100) CHARACTER SET latin1 COLLATE latin1_general_cs NOT NULL,
  `exist` tinyint(1) NOT NULL,
  `updrank` int(11) NOT NULL,
  `poprank` int(11) NOT NULL,
  `origpic` varchar(512) CHARACTER SET latin1 COLLATE latin1_general_cs NOT NULL,
  `source` varchar(512) CHARACTER SET latin1 COLLATE latin1_general_cs NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;

Apache / 2.2.22(Ubuntu) MySQL客户端版本:5.5.31 PHP扩展:mysqli

编辑:我没有解决问题所在,但我只是在新数据库中手动重新创建了结构,然后导入了表格。

0 个答案:

没有答案