当前位置: 技术问答>linux和unix
mysql 在 linux 的一些问题
来源: 互联网 发布时间:2016-08-28
本文导语: mysql -u root -p 登陆之后,我从别处考了一份内容比较长sql 代码 粘贴后 老出现没法执行的情况, 给出单引号 但是我一段段的copy 代码 再粘贴 就不会出现了,这是什么 原因 , mysql 客户端难道有问题 另外 我在插入一...
mysql -u root -p
登陆之后,我从别处考了一份内容比较长sql 代码
粘贴后 老出现没法执行的情况, 给出单引号
但是我一段段的copy 代码 再粘贴 就不会出现了,这是什么 原因 ,
mysql 客户端难道有问题
另外 我在插入一条sql 语句时,中文没出现乱码 ,
但是用source /home/user/sql.sql 导入 时却出现中文不显示 ,
我看了几处设置编码 的地方,我都 设成utf8 ,还是没能解决
mysql> insert into FLOWCARD (ID, FLOWCARD_NO, STAT
-> ('T2QN2D41YHB28LdO2NFNABNYMIXY8Y3H', '201001260002', 'L', '8sd9896afdad4450affc4f47db497bb3', 'c30fb2b5cce848ce99c398271597c410', 'a210e128162f4289b53aec137a17a1f7', '2009-10-23', '85a711ecd20345009e2672a0e5d64146', '2012-12-12',' spotter desc', 'ff80808126a990800126a99081c90001', '2009-10-23', 'ff80808126a990800126a99081c90001', '2009-10-23', 'F');
ERROR 1064 (42000): 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 '('T2QN2D41YHB28LdO2NFNABNYMIXY8Y3H', '201001260002', 'L', '8sd9896afdad4450affc4' at line 2
mysql> insert into FLOWCARD (ID, FLOWCARD_NO, STATUS, FISCALPERIODID, DISTRI_ID, RECORDER_ID, RECORDER_DATE, SPOTTER_ID, spotdate,SPOTTER_DESC, ADJUSTER_ID, ADJUSTER_DATE, FUSHEN_ID, FUSHEN_DATE, FLAG) values
-> ('T3QN2D41YHB28LdO2NFNABNYMIXY8Y3H', '201001260003', 'L', '8sd9896afdad4450affc4f47db497bb3', 'c30fb2b5cce848ce99c398271597c410', 'a210e128162f4289b53aec137a17a1f7', '2009-10-23', '85a711ecd20345009e2672a0e5d64146', '2012-12-12', ' spotter desc', 'ff80808126a990800126a99081c90001', '2009-10-23', 'ff80808126a990800126a99081c90001', '2009-10-23', 'F');
Query OK, 1 row affected (0.00 sec)
mysql>
mysql> insert into FLOWCARD (ID, FLOWCARD_NO, STATUS, FISCALPERIODID, DISTRI_ID, RECORDER
-> ('T3QN2D41YHss8LdO2NFNABNYMIXY8Y3H', '201001260004', 'S', '8sd9896afdad4450affc4f47db497bb3', 'c30fb2b5cce848ce99c398271597c410', 'a210e
'>
'> insert into FLOWCARD (ID, FLOWCARD_NO, STATUS, FISCALPERIODID, DISTRI_ID, RECORDER_ID, RECORDER_DATE, SPOTTER_ID, spotdate, SPOTTER_DESC, ADJUSTER_ID, ADJUSTER_DATE, FUSHEN_ID, FUSHEN_DATE, FLAG) values
'> ('T3QN2D4sYHss8LsO2NFNABNYMIXY8Y3H', '201001260005', 'A', '8sd9896afdad4450affc4f47db497bb3', 'c30fb2b5cce848ce99c398271597c410', 'a210e128162f4289b53aec137a17a1f7', '2009-10-23', '85a711ecd20345009e2672a0e5d64146', '2012-12-12',' spotter desc', 'ff80808126a990800126a99081c90001', '2009-10-23', 'ff80808126a990800126a99081c90001', '2009-10-23', 'F');
'>
'> insert into FLOWCARD_DETAIL (ID, FLOWCARD_ID, MATERIAL_ID, MATERIAL_COUNT, CLIENT_ID, ADJUST_COUNT, ADJUST_REASON) values
'> ('T4QN2D41YHB28LdO2NFNABNYMIXY8Y3H', 'T1QN2D41YHB28LdO2NFNABNYMIXY8Y3H', '8f7d97667e9d48759f847a10869fafde', 100, 'e5689c143c4c44we9c33w76cs2499940', 10, ' 无条件 ');
'>
'> insert into FLOWCARD_DETAIL (ID, FLOWCARD_ID, MATERIAL_ID, MATERIAL_COUNT, CLIENT_ID , ADJUST_COUNT, ADJUST_REASON) values
'> ('T4QN2D41YHB28LxO2NFnsBNYMIXY8Y3H', 'T1QN2D41YHB28LdO2NFNABNYMIXY8Y3H', 'bds6ab50bd6443e4a9c32062dc660b33', 200, 'e5689c143c4c44709c33w76cs2499940' ,-10, ' 无条件 ');
'>
'> insert into FLOWCARD_DETAIL (ID, FLOWCARD_ID, MATERIAL_ID, MATERIAL_COUNT, CLIENT_ID, ADJUST_COUNT, ADJUST_REASON) values
'> ('T5QN2D41YHB28LdO2NFNABNYMIXY8Y3H', 'T2QN2D41YHB28LdO2NFNABNYMIXY8Y3H', '43b705de034f4025929febb93eca6201', 100, 'c30fb2b5cce848ce99c398271597c410' , 10, ' 无条件 ');
'>
'> insert into FLOWCARD_DETAIL (ID, FLOWCARD_ID, MATERIAL_ID, MATERIAL_COUNT, CLIENT_ID, ADJUST_COUNT, ADJUST_REASON) values
'> ('T6QN2D41YHB28LdO2NFNABNYMIXY8Y3H', 'T3QN2D41YHB28LdO2NFNABNYMIXY8Y3H', 'bds6ab50bs6443e4a9c32062dc660b33', 100, 'e5689c143c4c44709c33w76cs2499940' , -10, ' 无条件 ');
'>
'> insert into FLOWCARD_DETAIL (ID, FLOWCARD_ID, MATERIAL_ID, MATERIAL_COUNT, CLIENT_ID, ADJUST_COUNT, ADJUST_REASON) values
'> ('T6QN2D41YHB28LdO2NFNABNYMIXY8Y32', 'T3QN2D41YHss8LdO2NFNABNYMIXY8Y3H', 'bds6ab50bs6443e4a9c32062dc660b33', 100, 'e5689c143c4c44709c
->
-> commit;
ERROR 1064 (42000): 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 '('T3QN2D41YHss8LdO2NFNABNYMIXY8Y3H', '201001260004', 'S', '8sd9896afdad4450affc4' at line 2
mysql>
|
the right syntax to use near '('T2QN2D41YHB28LdO2NFNABNYMIXY8Y3H', '201001260002', 'L', '8sd9896afdad4450affc4' at line 2
它说('T2QN2D41YHB28LdO2NFNABNYMIXY8Y3H', '201001260002', 'L', '8sd9896afdad4450affc4是第二行的内容,换行了?
你试着去掉自动换行
它说('T2QN2D41YHB28LdO2NFNABNYMIXY8Y3H', '201001260002', 'L', '8sd9896afdad4450affc4是第二行的内容,换行了?
你试着去掉自动换行
|
或者你源文件是WIN下做的?
如果是的话用一下dos2unix
如果是的话用一下dos2unix
|
估计是这个原因 一个语句被分成2行了
|
回复于:2010-05-16 08:49:52
引用 2 楼 liucy1983 的回复:
你们上外网是不是要用什么H3C或锐捷的客户端??
好久不见呀
:),前段时间对它里的问题有些厌烦,加上比较忙,所以就没来