简体   繁体   English

我有一个要导入的 sql 转储,但出现语法错误

[英]I have a sql dump I'm trying to import but I get a syntax error

Error错误

Static analysis:静态分析:

2 errors were found during analysis.分析过程中发现2个错误。

  1. Unexpected beginning of statement.出乎意料的声明开头。 (near "phpMyAdmin" at position 0) (在位置 0 的“phpMyAdmin”附近)
  2. Unrecognized statement type.无法识别的语句类型。 (near "SQL" at position 11) (靠近位置 11 的“SQL”)

SQL query: SQL查询:

phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Apr 12, 2017 at 04:16 AM -- Server version: 10.1.13-MariaDB -- PHP Version: 5.6.23 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"

MySQL said: Documentation MySQL 说:文档

#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.5.1
 -- http://www.phpmyadmin.net
 --
 -- Host: 12' at line 1

fixed by:固定:

Skip this number of queries (for SQL) starting from the first one: 1 (instead of 0)从第一个开始跳过这个数量的查询(对于 SQL):1(而不是 0)

-- indicates a comment in SQL . --表示 SQL 中的注释 I imagine your dump was supposed to look like this with everything up to SET SQL_MODE ... being a comment.我想你的转储应该看起来像这样,直到SET SQL_MODE ...作为评论。

-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net --
-- Host: 127.0.0.1
-- Generation Time: Apr 12, 2017 at 04:16 AM
-- Server version: 10.1.13-MariaDB
-- PHP Version: 5.6.23

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO" 

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我如何才能将此SQL转储导入到PhpMyAdmin中而不会出现此错误? - How can I get this SQL dump to import into PhpMyAdmin without this error? 我正在尝试更新表 SQL 的值,但在 Java 中出现错误 - I'm trying to update the values ​of a table SQL have an error in Java 出现 SQL 错误或我缺少语法? - Having an SQL Error or I'm missing a syntax? 如何在sql dump中获得完整语法? - How do I get full syntax in sql dump? m#1064-您的SQL语法有错误我是SQL的新手 - m #1064 - You have an error in your SQL syntax I am all most new to SQL 为什么我收到“您的SQL语法有错误”错误? - Why I'm getting “You have an error in your SQL syntax” error? 我有一个.sql文件并将其导入,但是我尝试抛出一个错误,该错误表明该表可以保留表,但是我只是以这种方式创建数据库和表 - I have a .sql file and import it but I attempt throws an error which says it esiste the table but I'm just creating the database and table in this way 为什么我在尝试使用pymysql运行“Status”后出现“你的SQL语法中有错误;”错误? - Why am I getting this “You have an error in your SQL syntax;” error after trying to run “Status” with pymysql? 我可以在 postgresql 数据库中导入 sql dump - Can i import sql dump in postgresql database 尝试转储数据库时出现错误 2 或“拒绝访问” - When trying to dump a database I get error 2 or “access denied”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM