I have a local MySQL dump that I want to migrate to my database cluster. Since the local MySQL is not available on the network I cant use the normal Migrate database
functionality. Instead I want to import it as a dump/backup. However, I am encountering an issue where the query takes longer than 30 seconds or the packet is larger than 16 MB, causing the error Lost connection to MySQL server during query
. This is a common problem for larger queries, and the usual solution is to increase the values of the max_allowed_packet
and max_execution_time
fields. I attempted to do this through the CLI, but I was informed that I need superadmin
rights to make these changes. I also cannot find any settings on the dashboard that would resolve this issue.
How do you solve this problem here on DigitalOcean?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Enter your email to get $200 in credit for your first 60 days with DigitalOcean.
New accounts only. By submitting your email you agree to our Privacy Policy.
Hi there,
For the Managed Database clusters, you can’t directly make the changes, but instead, you would need to use the DigitalOcean API. You can find the documentation on how to make such config changes to your managed clusters here:
https://docs.digitalocean.com/reference/api/api-reference/#operation/databases_patch_config
Your request will look something like this:
The
max_execution_time
is not configurable as far as I can see, but you can try also increasing theconnect_timeout
instead.Let me know how it goes!
Best,
Bobby