2

Exported from PHP my admin on my wamp server and importing into my lamp server - phpmyadmin also.

First error I got #1067 - Invalid default value for 'datetime' I then changed CURRENT_TIMESTAMP to TIMESTAMP and now I am getting the following error: #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

Here the first chunk of my file:

-- 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 client version: 5.5.31 PHP extension: mysqli

EDIT: I didn't work out what the issue was, but I just recreated the structure manually in the new db then imported the tables.

Dharman
  • 30,962
  • 25
  • 85
  • 135
Melbourne2991
  • 11,707
  • 12
  • 44
  • 82

0 Answers0