How to adjust the maximum packet size of MySQL server?
updated at
If you create your repository database in a MySQL type server, you may receive the following warning message when setting up the repository database.
“Your Database Maximum Packet Size is 4 MB. Please adjust it to at least 32 MB to avoid file upload failure”
Steps for General MySQL Server
- Open the MySQL option file (e.g., my.ini, my.cnf).
- Search for the "max_allowed_packet" parameter. If the file does not have it, add the parameter to the file.
- Set the value as needed, such as max_allowed_packet=32M
- Restart the MySQL Server.
Steps for Amazon RDS for MySQL
- Sign in to the AWS Management Console and open the Amazon RDS console.
- In the navigation pane, choose Parameter groups, and then click Create parameter group.
- In the Group name box, enter a name such as "mysql5-7-max-allowed-packet-32M". In the Description box, enter a description. Then, click Create.
- In the navigation pane, choose Databases, and then choose the target database (in our case, we use navicatdemo).
- Click Modify.
- Change the DB parameter group value to "mysql5-7-max-allowed-packet-32M".
- Click Continue and check the summary of modifications.
- Choose Apply immediately and click Modify DB Instance.
- Go back to RDS > Databases > navicatdemo, and choose the Configuration tab:
- Scroll to Parameter group and click "mysql5-7-max-allowed-packet-32M":
- In the Filter parameter box, enter "max_allowed_packet".
- Check the "max_allowed_packet" checkbox and click Edit parameters.
- Enter "33554432" into the Values column and click Save changes.
- Go back to RDS > Databases > navicatdemo. Choose Actions > Reboot and click Confirm to reboot the target RDS database.
Have more questions?
-
Support
-
About Us