问题描述
我正在使用Amazon Web服务,并且已经设置了EC2和RDS,并安装了apache,php,mysql,phpmyadmin.
Im using Amazon Web services and I've setup EC2 and RDS and installed apache, php, mysql, phpmyadmin.
我可以导入小的sql文件(我也设置了worpdress并为此-fine导入了sql db),但是当我尝试使用腻子导入200mg的sql文件时,我得到了
I can import small sql files (I also setup worpdress and imported a sql db for that -fine) but when I try to import a 200mg sql file using putty I get
进行了一些研究之后,似乎在 DB参数组中增加 max_allowed_packet , wait_timeout 和 net_read_timeout 可能会有所帮助,它没有(我做了更改后确实重启了,我也使用RightScale仪表板将这些设置为它们的最大允许值).
After doing some research it seemed increasing max_allowed_packet, wait_timeout and net_read_timeout in DB Parameter Groups would help but it didnt (I did reboot after making changes, I also set those to their maximum allowed values using RightScale dashboard).
还有什么我应该意识到的可能是导致这种情况的原因吗?
Is there anything else I should be aware of that might be causing this?
我也没有运气尝试过bigdump.php.
I also tried bigdump.php with no luck.
我认为大量的人使用aws上传大型mysql数据库,这有点让我发疯.
I presume loads of people upload large mysql databases using aws so this is kinda driving me crazy.
推荐答案
我遇到了同样的问题:
- 转到您的RDS信息中心,然后点击参数组.
- 点击创建数据库参数组,将其命名为"LargeImport"(确保您选择的数据库参数组族与您的实例版本匹配)并编辑参数.
- 增加"LargeImport"上的" max_allowed_packet "以适应您的导入大小(有效值为1024-1073741824).
- 增加" wait_timeout "参数以适应您的导入大小. (有效值为1-31536000秒).
- 保存您的更改.
- 点击左侧列中的实例,然后选择您的实例.
- 点击实例操作,然后选择修改.
- 将参数组更改为新的"LargeImport"组,然后单击继续.
- 点击修改数据库实例".
- 更改完成后,再次单击实例操作,然后重新启动实例.
- Go to your RDS Dashboard and click Parameter Groups.
- 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.
- Increase the 'max_allowed_packet' on 'LargeImport' to accommodate your import size (Valid values are 1024-1073741824).
- Increase the 'wait_timeout' parameter to accommodate your import size. (Valid values are 1-31536000 seconds).
- Save your changes.
- Click Instances in the left column and select your instance.
- Click Instance Actions and choose Modify.
- Change the Parameter Group to your new 'LargeImport' group and click Continue.
- Click 'Modify DB Instance'.
- Once the change has completed, click Instance Actions again and reboot your instance.
实例重新启动后,您应该可以进行较大的sql导入.
Once your instance has rebooted, you should be able to do larger sql imports.
完成导入后,将实例参数组切换回默认参数组,然后再次重新启动.
希望这会有所帮助.
这篇关于使用腻子在AWS RDS上上传大型mysql数据库-'MySQL服务器已消失'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!