2

从我的 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 ' linkvarchar(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

编辑:我没有弄清楚问题是什么,但我只是在新数据库中手动重新创建了结构,然后导入了表。

4

0 回答 0