简体   繁体   中英

error when importing database to site

When I'm trying to import my database to my site through a .sql file, I always get an error and I don't know what to make of it.

I will post the error below.

There is a chance that you may have found a bug in the SQL parser. Please examine your query closely, and check that the quotes are correct and not mis-matched. Other possible failure causes may be that you are uploading a file with binary outside of a quoted text area. You can also try your query on the MySQL command line interface. The MySQL server error output below, if there is any, may also help you in diagnosing the problem. If you still have problems or if the parser fails where the command line interface succeeds, please reduce your SQL query input to the single query that causes problems, and submit a bug report with the data chunk in the CUT section below:

----BEGIN CUT----
eNodjTsOwjAUBKnfKfYAwYo/EHBnRU5AcmJjh0+PKCJF7pDg9jjUM7NrY/RRo+VoBZwdNTgEVHPc
15SmQjZEwzddnMaOcdbI7XNZ6JoifKpgejtOFW62iPc5oztH2/kHJGc1hcFoqBIdKJzCKlU+rTOK
CQk35/eHnBl7jVem/8MPI0shyQ==
----END CUT----
----BEGIN RAW----

ERROR: C1 C2 LEN: 1 2 47960
STR: 

MySQL: 5.1.73-cll
USR OS, AGENT, VER: Win FIREFOX 31.0
PMA: 4.1.8
PHP VER,OS: 5.4.23 Linux
LANG: en
SQL: 

----END RAW----

The actual error message is:

#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 'U' at line 1

First lines from the .sql:

USE [kal_auth]
GO
/****** Object:  User [kal]    Script Date: 08/11/2014 14:44:15 ******/
CREATE USER [kal] WITHOUT LOGIN WITH DEFAULT_SCHEMA=[kal]
GO
/****** Object:  Schema [kal]    Script Date: 08/11/2014 14:44:04 ******/
CREATE SCHEMA [kal] AUTHORIZATION [kal]
GO
/****** Object:  Table [dbo].[CNum]    Script Date: 08/11/2014 14:44:14 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[CNum](
[UID] [int] NOT NULL,
[Num] [int] NOT NULL,
CONSTRAINT [PK_CNum] PRIMARY KEY CLUSTERED 

You haven't found a bug in the SQL parser. You're simply trying to run SQL Server code in MySQL.


The SQL acronym refers to a computer language used to query relational databases. Products that can speak SQL often include SQL on their names (MySQL, SQL Server, PostgreSQL...) but that's all, a name. The term itself represents a language , not a specific product.

The SQL language is useful because it doesn't belong to a single vendor. However, each vendor implements its own dialect. You simple cannot run arbitrary SQL on an arbitrary system.

the hosting provider said MSSQL is enabled, just not very popular

MSSQL is not an option inside MySQL. It's an entirely different piece of software.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM