python链接mysql出错:_mysql_exceptions.ProgrammingError: (1064, "You have an error in your SQL syntax;

这个问题发生在我做的项目中的一个内容。处理数据,然后写入mysql数据库中。

报错情况:

_mysql_exceptions.ProgrammingError: (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 's qpopper allows remote attackers to gain root access using a long PASS command.' at line 1")

解决思路:

刚开始报错出现下面这种情况,于是我就各种百度,然后也没查不出来具体的原因。

python链接mysql出错:_mysql_exceptions.ProgrammingError: (1064,

然后我就把要产生的待处理的数据在Navicat中插入看看能否正常执行。

这不是老问题吗?单双引号的问题!!!

于是就又找到了我另外一篇博客:https://blog.csdn.net/Homewm/article/details/81665511

结果问题就解决了!!!

 

 

你可能感兴趣的:(mysql数据库,python学习)