python3 操作mysql报错pymysql.err.OperationalError: (2003, "Can't connect to MySQL server on 'localhost'
1.python代码#!/usr/bin/python3importpymysql#打开数据库连接db=pymysql.connect("localhost","testuser","test123","TESTDB")#使用cursor()方法创建一个游标对象cursorcursor=db.cursor()#使用execute()方法执行SQL查询cursor.execute("SELECTVE