python 操作mysql
1、安装pip install PyMySQL
pip install PyMySQL 或下载:https://pypi.python.org/pypi/PyMySQL 或https://github.com/PyMySQL/PyMySQL
查看:pip show pymysql
数据中包含单引号保存时需要转义处理:
from pymysql.converters import escape_string
txt = escape_string(txt)