duanjuan1103 2017-01-14 16:01
浏览 91
已采纳

导入时出现Sql语法错误

I want to import my SQL into a new database.

Here is my SQL code:

-- phpMyAdmin SQL Dump
-- version 2.11.9.2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Nov 03, 2013 at 05:43 PM
-- Server version: 5.0.67
-- PHP Version: 5.2.6

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

--
-- Database: `rss_aggregator`
--

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

--
-- Table structure for table `admin`
--

CREATE TABLE IF NOT EXISTS `admin` (
  `id` varchar(1) NOT NULL,
  `admin` varchar(40) NOT NULL,
  `password` varchar(255) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `admin`
--

INSERT INTO `admin` (`id`, `admin`, `password`) VALUES
('1', 'admin', 'c3284d0f94606de1fd2af172aba15bf3');

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

--
-- Table structure for table `categories`
--

CREATE TABLE IF NOT EXISTS `categories` (
  `category_id` int(12) NOT NULL auto_increment,
  `category_title` varchar(255) character set utf8 collate utf8_persian_ci NOT NULL,
  `category_order` int(12) NOT NULL,
  PRIMARY KEY  (`category_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;

--
-- Dumping data for table `categories`
--

INSERT INTO `categories` (`category_id`, `category_title`, `category_order`) VALUES
(1, 'cate1', 2),
(2, 'cate2', 1);

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

--
-- Table structure for table `feeditems`
--

CREATE TABLE IF NOT EXISTS `feeditems` (
  `item_id` int(12) NOT NULL auto_increment,
  `item_title` varchar(255) NOT NULL,
  `item_url` varchar(255) NOT NULL,
  `item_category_id` int(12) NOT NULL,
  `item_feed_id` int(12) NOT NULL,
  `item_details` text character set utf8 collate utf8_persian_ci NOT NULL,
  `item_datetime` varchar(100) NOT NULL,
  `item_unix_datetime` int(12) NOT NULL,
  `item_hits` int(12) NOT NULL,
  `item_published` int(1) NOT NULL,
  `item_pinned` int(1) NOT NULL,
  PRIMARY KEY  (`item_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;

--
-- Dumping data for table `feeditems`
--


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

--
-- Table structure for table `feeds`
--

CREATE TABLE IF NOT EXISTS `feeds` (
  `feed_id` int(12) NOT NULL auto_increment,
  `feed_url` varchar(255) NOT NULL,
  `feed_title` varchar(100) NOT NULL,
  `feed_logo` varchar(255) NOT NULL,
  `feed_category_id` int(12) NOT NULL,
  `feed_last_update` int(12) NOT NULL,
  `feed_items` int(3) NOT NULL,
  PRIMARY KEY  (`feed_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;

--
-- Dumping data for table `feeds`
--

INSERT INTO `feeds` (`feed_id`, `feed_url`, `feed_title`, `feed_logo`, `feed_category_id`, `feed_last_update`, `feed_items`) VALUES
(1, 'http://url1', 'item1', '86371381906650.jpg', 1, 1381906864, 5),
(2, 'http://url2', 'item2', '33781381908943.jpg', 2, 1383498344, 10);

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

--
-- Table structure for table `setting`
--

CREATE TABLE IF NOT EXISTS `setting` (
  `id` int(1) NOT NULL,
  `seo_title` varchar(255) NOT NULL,
  `seo_keywords` text NOT NULL,
  `seo_description` text NOT NULL,
  `site_template` varchar(100) NOT NULL,
  `direct_links` int(1) NOT NULL,
  `new_items_number` int(2) NOT NULL,
  `top_hits_items_number` int(2) NOT NULL,
  `category_items_number` int(2) NOT NULL,
  `ad_slot_728` text NOT NULL,
  `ad_slot_300` text NOT NULL,
  `friendly_urls` int(1) NOT NULL,
  `pagination_style` int(1) NOT NULL,
  `display_rss` int(1) NOT NULL,
  `display_category_rss` int(1) NOT NULL,
  `rss_items_number` int(4) NOT NULL,
  `facebook` varchar(255) NOT NULL,
  `twitter` varchar(255) NOT NULL,
  `google_plus` varchar(255) NOT NULL,
  `display_calendar` int(1) NOT NULL,
  `google_analytics` text NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `setting`
--

INSERT INTO `setting` (`id`, `seo_title`, `seo_keywords`, `seo_description`, `site_template`, `direct_links`, `new_items_number`, `top_hits_items_number`, `category_items_number`, `ad_slot_728`, `ad_slot_300`, `friendly_urls`, `pagination_style`, `display_rss`, `display_category_rss`, `rss_items_number`, `facebook`, `twitter`, `google_plus`, `display_calendar`, `google_analytics`) VALUES
(1, 'title of the page', 'keyworks', 'desc', 'v2', 0, 15, 15, 15, '<img src="upload/top.jpg" />', '<img src="upload/left.jpg" />', 1, 2, 1, 1, 10, 'http://www.facebook.com', 'http://twitter.com', '', 0, '');

When i want to import that into new database, i got this 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 'phpMyAdmin SQL Dump -- version 2.11.9.2
  • 写回答

1条回答 默认 最新

  • donglusou3335 2017-01-14 16:31
    关注

    I reorganized.

    DBNAME: deneme;

    PHP Version: 7.0.13

    I prepared it in Turkish.But the syntax is the same

    try

    Pic

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!
  • ¥15 drone 推送镜像时候 purge: true 推送完毕后没有删除对应的镜像,手动拷贝到服务器执行结果正确在样才能让指令自动执行成功删除对应镜像,如何解决?