Run the Blob test program. The data is a bit large, 32 MB. the following error message is returned:
Com. MySQL. JDBC. packettoobigexception: packet for query is too large (37748784> 1048576). You can change this value on the server by setting the max_allowed_packet 'variable.
At com. MySQL. JDBC. mysqlio. Send (mysqlio. Java: 2691)
At com. MySQL. JDBC. mysqlio. sendcommand (mysqlio. Java: 1612)
At com. MySQL. JDBC. mysqlio. sqlquerydirect (mysqlio. Java: 1723)
At com.mysql.jdbc.connection.exe csql (connection. Java: 3283)
At com.mysql.jdbc.preparedstatement.exe cuteinternal (preparedstatement. Java: 1332)
At com.mysql.jdbc.preparedstatement.exe cuteupdate (preparedstatement. Java: 1604)
At com.mysql.jdbc.preparedstatement.exe cuteupdate (preparedstatement. Java: 1519)
Solution: add the following section in [mysqld] In my. ini:
[Mysqld]
Max_allowed_packet = 64 m
Note: The value added in [client] and [MySQL] is invalid, which is the parameter read by the client.
Note: You need to restart the MySQL service!