解决报错:Variable ‘sql_mode’ can’t be set to the value of ‘NULL'(Solve the error: variable ‘SQL_ mode’ can’t be set to the value of ‘NULL’)

用软件导出的数据文件,用source或者软件导入的时候常常有一些类似报错:

Variable ‘sql_mode’ can’t be set to the value of ‘NULL’解决方法

产生原因:

这是由于导出的sql数据文件中的某些注释语句比如下面的注释语句引起的

 .........

0./*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
0./*!40014 SET NAMES UTF8*/

.........

解决方法:

删除注释语句

转自 http://www.blogdaren.com/post-2065.html

————————

For data files exported with software, there are often some similar errors when importing with source or software:

Variable ‘sql_mode’ can’t be set to the value of ‘NULL’解决方法

Causes:

This is caused by some annotation statements in the exported SQL data file, such as the following annotation statements

 .........

0./*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
0./*!40014 SET NAMES UTF8*/

.........

resolvent:

Delete comment statement

转自 http://www.blogdaren.com/post-2065.html