MySQL将无法连接在EC2上使用橡胶部署橡胶、MySQL

2023-09-11 23:45:36 作者:Tutu颜值担当

我用橡皮部署Rails应用程序时遇到连接到MySQL的麻烦。我必须手动设置MySQL在EC2或应该橡胶已经这样做了? 虽然这是不是所有的帮助,这里是日志输出时,耙RAN:

  ** [出:: db01.memepluspl.us]耙中止!
 ** [出:: db01.memepluspl.us]
 ** [出:: db01.memepluspl.us]拒绝访问用户@db01.memepluspl.us'数据库'meme_plus_plus_production
 ** [出:: db01.memepluspl.us]
 ** [出:: db01.memepluspl.us]
 ** [出:: db01.memepluspl.us]任务:TOP => DB:迁移=>环境
 

解决方案

在我的情况下,应用程序名称我输入rubber.yml实际上是不同的,那么实际的应用程序名称(项目文件保留占位符的名称)...

我SSH方式登录的情况下,寻找电流/ 猫的config / database.yml中 那么就尝试运行连接命令耙将尝试从东西那里运行和错误在那里,所以我建议不妨更好地调试这是怎么回事

我猜我不得不改变橡胶mysql.yml的configs ...进出口重现舞台的东西,现在,我认为它至少应该通过这个问题.. GL

6.linux上Docker部署Nacos Server与mysql镜像连接 单机版

I'm using rubber to deploy a rails application and am having trouble connecting to MySQL. Do I have to manually setup MySQL on EC2 or should Rubber have already had done that? While this isn't all that helpful, here is log output when rake is ran:

 ** [out :: db01.memepluspl.us] rake aborted!
 ** [out :: db01.memepluspl.us] 
 ** [out :: db01.memepluspl.us] Access denied for user ''@'db01.memepluspl.us' to database 'meme_plus_plus_production'
 ** [out :: db01.memepluspl.us] 
 ** [out :: db01.memepluspl.us] 
 ** [out :: db01.memepluspl.us] Tasks: TOP => db:migrate => environment

解决方案

in my case, the app name I had input in rubber.yml was actually different then the actual app name(the project files retains placeholder name)...

I ssh'd into the instance, looked for current/ and cat config/database.yml then just tried running the connect command rake would try to run from the stuff there and the error was there, so I'd suggest trying to better debug what's going on

I guessed I had to change the rubber-mysql.yml configs... Im recreating the staging stuff now, I think it should at least pass through this issue.. gl