Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS-RDS Max Allowed Packet Value Cant Be Changed

I have a MySQL database in Amazon RDS setup right now that needs to be able to act as a database and also be able to store some flat files.

It was working just fine for a while until I noticed it wasn't storing anything over 1MB... and I couldn't figure out why. So I dove deeper into RDS and learned about parameter groups. It seems to be a subset of configurations for the database itself, and so I figured it was the max_allowed_packet value was the problem and I set it to a higher value.

However, I was still unable to make uploads over 1MB so then I realized there was another parameter by the name of mysqlx_max_allowed_packet and its value is set to about 1MB, but I am unable to change it.

Does anyone have any idea how to get around this or if it is possible?

like image 988
Vincent Morris Avatar asked Jun 08 '19 03:06

Vincent Morris


1 Answers

I hope these steps help.

  1. Go to your RDS Dashboard and click Parameter Groups.
  2. Click Create DB Parameter Group, name it something like 'LargeImport', (making sure the DB Parameter Group Family you select matches your instance version) and edit the parameters.
  3. Increase the 'max_allowed_packet' on 'LargeImport' to accommodate your import size (Valid values are 1024-1073741824).
  4. Increase the 'wait_timeout' parameter to accommodate your import size. (Valid values are 1-31536000 seconds).
  5. Save your changes.
  6. Click Instances in the left column and select your instance.
  7. Click Instance Actions and choose Modify.
  8. Change the Parameter Group to your new 'LargeImport' group and click Continue.
  9. Click 'Modify DB Instance'.
  10. Once the change has completed, click Instance Actions again and reboot your instance.

Once your instance has rebooted, you should be able to do larger SQL imports.

Once you've completed your import, switch your instance parameter group back to the default parameter group and reboot it again.

like image 116
Marjan Avatar answered Sep 28 '22 12:09

Marjan