the technology
- mySQL Server 5.?
- python 2.6
- MySQLdb 2.3.1?
- Windows 7
the scenario
1. import MySQLdb
2. create a connection to the db:
> connxn = MySQLdb.connect(params_dict)
3. loop, re-using the connection, each time inserting say 250 records in one query
> cursor = connxn.cursor()
> cursor.execute(multi_record_insert_statement)
> cursor.close()
> connxn.commit()
problem is, i was getting the following errors:
- 1153, 'Got a packet bigger than 'max_allowed_packet' bytes'
then, when i tried to create a new connection, i was getting
- 2006, 'MySQL server has gone away'
Subscribe to:
Post Comments (Atom)
Very informative error.Thank you author for posting this kind of errors .
ReplyDeletehttp://www.wikitechy.com/fix-error/mysql-error-1153-got-a-packet-bigger-than-max-allowed-packet-bytes
Both are really good.
Cheers,
Venkat