导入MySQL数据库时出错

时间:2017-02-25 17:55:33

标签: mysql

昨天,我导出了一个功能齐全的网站MySQL数据库。今天我删除了数据库并尝试导入。

我不明白这个错误,因为我不是MySQL专家。但我之前已多次做过(导出,删除和导入)并且从未遇到任何问题。

我收到以下错误:

静态分析:

9 errors were found during analysis.

Unexpected character. (near ":" at position 664)
Unexpected character. (near ":" at position 732)
Unexpected character. (near ":" at position 735)
Unexpected character. (near ":" at position 755)
Unexpected character. (near ":" at position 758)
Unexpected character. (near "[" at position 765)
Unexpected character. (near "]" at position 767)
Unexpected character. (near "[" at position 788)
Unexpected character. (near "]" at position 790)

SQL query:

MySQL said: Documentation
#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 's comments. There you will have the option to edit or delete them.', 0, '1', '',' at line 2

前几行是......

-- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Host: pdb14.websitehostingmart.com
-- Generation Time: Feb 25, 2017 at 06:00 PM
-- Server version: 5.7.17-log
-- PHP Version: 5.5.38

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 utf8mb4 */;

--
-- Database: `135184_562`
--

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

--
-- Table structure for table `wp_commentmeta`
--

1 个答案:

答案 0 :(得分:2)

以xml格式导出,进行更改(替换所有或任何内容),然后导入。正如@DhruvSaxena指出.sql文件的seialized数据可能会中断。

相关问题