We're going to fix the following issue
The query length of 118146958 bytes is larger than max_allowed_packet size (33554432).
First of all, let's check the current size
SHOW VARIABLES LIKE 'max_allowed_packet';
Output:
+--------------------+-----------+
| Variable_name | Value |
+--------------------+-----------+
| max_allowed_packet | 33554432 |
+--------------------+-----------+
Note that the value is 33554432 bytes, which is equivalent to 32MB.
Use the MySQL root user to set the desired value in bytes:
mysql -h <DB_HOST> -u root -p <DB_NAME> -e "SET GLOBAL max_allowed_packet=268435456;"
Let's check the size
mysql -h <DB_HOST> -u <DB_USER> -p <DB_NAME> -e "SHOW VARIABLES LIKE 'max_allowed_packet';"
Output:
+--------------------+-----------+
| Variable_name | Value |
+--------------------+-----------+
| max_allowed_packet | 268435456 |
+--------------------+-----------+