SQL代码:
INSERT INTO bbssection(ID,section,bbsarea,moderator) VALUES ('1','软件答疑','iecc技术区','tisty');
INSERT INTO bbssection(ID,section,bbsarea,moderator) VALUES ('2','硬件答疑','iecc技术区','tisty');
......
代码保存为UTF-8格式,因为默认导入的是UTF-8的,导入时提示
#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 'INSERT INTO bbssection(ID,section,bbsarea,moderator) VALUES ('1','软件ç”ç–' at line 1 分析应该是编码的问题,可我都是UTF-8的啊请教高手。。
INSERT INTO bbssection(ID,section,bbsarea,moderator) VALUES ('1','软件答疑','iecc技术区','tisty');
INSERT INTO bbssection(ID,section,bbsarea,moderator) VALUES ('2','硬件答疑','iecc技术区','tisty');
......
代码保存为UTF-8格式,因为默认导入的是UTF-8的,导入时提示
#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 'INSERT INTO bbssection(ID,section,bbsarea,moderator) VALUES ('1','软件ç”ç–' at line 1 分析应该是编码的问题,可我都是UTF-8的啊请教高手。。
解决方案 »
- MySQLWorkbench.exe - . NET Framework Initialization Error
- MySQL中存储过程stored procedure中报错,END这里画浪线啊
- 求助:netbeans连接mysql出错
- 请教外部程序轮询Mysql的innodb表以及event_schedule同步问题
- MySQL关于显示时间的问题
- mysql中的几个问题
- MySql中,请教如何比较DateTime类型与字符串?
- 我是一个mysql的初学者,请教一个问题!
- mysql 实现论坛回复功能
- update mysql清零数据的问题
- mysql 按字段中内容的首字母分表,要怎么写。
- [100分]MySQL查询问题,用 in 时的奇怪现象!
然后执行
2、把两个INSERT 语句写到文本文件里,然后在MYSQL的命令行客户端执行 source 你的文件
我用的是远程的数据库,不能远程连接,只能以localhost登陆,phpmyadmin为什么不行,不是导入的时候用的utf-8了,3楼大牛可否解释一下set names gbk这句。
Unicode Signature
有的编辑器在另存为UTF-8的时候
在编码选项处有一个 Add a Unicode Signature
有可能是这个原因。