Home > Database > Mysql Tutorial > body text

在使用Navicat for MySQL出现异常"You have an error i_MySQL

WBOY
Release: 2016-06-01 13:32:19
Original
2644 people have browsed it

Navicat

bitsCN.com

在使用Navicat for MySQL出现异常"You have an error in your SQL syntax......"解决

 

[Err] 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 '#

首先确定sql并没有语法错误 。

之后一般是sql文件的编码导致的,可以尝试切换不同的编码再运行。

 

比如我的一个sql文件是utf8的,但我修改了文件的一些内容后,再使用utf8编码运行,结果就出现上面的那个错误。

 

之后我切换成ansi ,再使用936 (ANSI/OEM - Simplified Chinese GBK)编码运行,就没有问题了,之后我再切换文件为utf8编码,然后再次尝试,也还是可以。

 

所以这个问题的解决思路就是从编码入手。 

 

bitsCN.com
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!