How to Solve python pymysql.err.OperationalError: (2013, ‘Lost connection to MySQL server during query’)
sql = "insert into aaa(id, a, b, c, d) values(%s,%s,%s,%s,%s)"
while True:
try:
with connect.cursor() as cursor:
cursor.execute(sql, (id01, a, b[0], c[1], d))
connect.commit()
break
except Exception:
connect.ping(True)
Similar Posts:
- pymysql.err.OperationalError: (1054, “Unknown column’aa’in’field list’)
- Solve the problem of pychart connecting MySQL 1366 and reporting an error
- How to Solve MYSQL Error: pymysql.err.InterfaceError: (0, ”)
- [How to Solve] Lost connection to MySQL server at ‘reading i…
- (20002, b’DB-Lib error message 20002, severity 9:\nAdaptive Server connection failed (127.0.0…
- [How to Solve] ImportError: No module named MySQLdb
- [Install OpenStack] Sync keystone database error: keystone DBConnectionError: (pymysql.err.OperationalError) (2003, “Can’t connect to MySQL server on ‘controller’ ([Errno 111] Connection refused)”)
- MySQL database insert into statement with parameters Error
- [Solved] Djiango Create Migrations Error: query = query.decode(errors=’replace’) AttributeError: ‘str’ object has no attribute ‘decode’
- [Solved] Springboot Project Connect MYSQL Error: Establishing SSL connection without server’s identity verification is not recommended.