jly8866 / archer

基于inception的自动化SQL操作平台,支持SQL执行、LDAP认证、发邮件、OSC、SQL查询、SQL优化建议、权限管理等功能,支持docker镜像
Apache License 2.0
1.56k stars 645 forks source link

提交阿里云RDS上线单报错 #92

Open jiaminxu opened 6 years ago

jiaminxu commented 6 years ago

我用阿里云账号提交sql 上线工单 提示
The backup dbname 'rm-xxx.mysql.rds.aliyuncs.com-3306-xxx' is too long.
老哥有遇到过么 image

hhyo commented 6 years ago

@jiaminxu inception本身限制,建议使用cname或者ip连接

2002wmj commented 5 years ago

我也遇到这个问题,RDS已经是cname了,不能缩短。

jiaminxu commented 5 years ago

你的rds是开通外网的还是内网的 如果是内网的可能没有办法。 如果是外网的话 你可以ping一下,然后替换成ip。就不会报错了

发件人: Minjie Wang notifications@github.com 发送时间: Wednesday, March 06, 2019 2:26 PM 收件人: jly8866/archer archer@noreply.github.com 抄送: Jiamin Xu(Hugo) jiaminxu@hengtiansoft.com; Mention mention@noreply.github.com 主题: Re: [jly8866/archer] 提交阿里云RDS上线单报错 (#92)

我也遇到这个问题,RDS已经是cname了,不能缩短。

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/jly8866/archer/issues/92#issuecomment-469984950, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AT3Wy3q80HfydpCBxVmYcB6H3n23DMVeks5vT19wgaJpZM4WcqVh. {"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/jly8866/archer","title":"jly8866/archer","subtitle":"GitHub repository","main_image_url":"https://github.githubassets.com/images/email/message_cards/header.png","avatar_image_url":"https://github.githubassets.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/jly8866/archer"}},"updates":{"snippets":[{"icon":"PERSON","message":"@2002wmj in #92: 我也遇到这个问题,RDS已经是cname了,不能缩短。"}],"action":{"name":"View Issue","url":"https://github.com/jly8866/archer/issues/92#issuecomment-469984950"}}} [ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/jly8866/archer/issues/92#issuecomment-469984950", "url": "https://github.com/jly8866/archer/issues/92#issuecomment-469984950", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

2002wmj commented 5 years ago

有没有办法加大这个限制?目前这个限制感觉太小了点。

hhyo commented 5 years ago

有没有办法加大这个限制?目前这个限制感觉太小了点。

可以尝试修改mysql_get_remote_backup_dbname的方法,只要做到唯一就没问题,规则可以自己定制: https://github.com/hhyo/inception/blob/master/sql/sql_parse.cc#L508

2002wmj commented 5 years ago

这个很麻烦了,我找到个办法,修改/etc/resolv.conf里面的search即可。

jokefaker commented 5 years ago

@2002wmj 你是 docker 运行的吗?我在 docker 里面修改了 /etc/resolv.conf 貌似没用...

2002wmj commented 5 years ago

@2002wmj 你是 docker 运行的吗?我在 docker 里面修改了 /etc/resolv.conf 貌似没用...

是的,加一个search就可以了。

fengbinddr commented 4 years ago

感谢 2002wmj 提供思路。 环境是archer docker安装, 步骤:1进入archery容器中修改/etc/resolv.conf,增加1行,search mysql.rds.aliyuncs.com ,inception容器也一样修改。 2 在Django 后台中,修改 实例配置>实例连接 把RDS的域名去掉,OK