# 连接数据库方法
def connect_data_base(self, sql):
conn = pymysql.connect(host='888.88.888.888', user='xxx', password='xxxxxxx',
database='comment', charset='utf8')
cursor = conn.cursor()
cursor
03-04
1584
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
11-13
3296
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)