# 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'phpMyAdmin SQL Dump
-- version 4.0.4.1
-- http://www.phpmyadmin.net
--
--...' at line 1
下面是我的SQL文件的前几行:
-- phpMyAdmin SQL Dump
-- version 4.0.4.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Dec 13, 2016 at 05:53 PM
-- Server version: 5.5.32
-- PHP Version: 5.4.19
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: `adminlogin`
--
1条答案
按热度按时间axr492tv1#
从https://stackoverflow.com/a/34323278/446106看,.sql文件似乎必须以一个空白注解行(
--
)开始。因此,如果您将其添加到开头,它将有希望导入OK。我不确定这是否是phpMyAdmin中的导出或导入过程的问题,但无论如何,在顶部添加
--
为我解决了这个问题。