简体   繁体   English

如何连接远程heroku数据库?

[英]How do I connect to a remote heroku db?

Don't have much experience with Heroku. 没有太多Heroku的经验。 I have the app/db name, username, password, and I have permission to access, but I'm not sure how to connect to it or configure Heroku to keep track of it, like the db's on my other apps. 我有app / db名称,用户名,密码,我有权访问,但我不知道如何连接它或配置Heroku来跟踪它,就像我的其他应用程序上的db一样。

Thanks! 谢谢!

It's been a while since I've done this so you might need to check that the format hasn't changed but remote databases in heroku are done through environment variables. 我已经有一段时间了,所以你可能需要检查格式是否没有改变,但heroku中的远程数据库是通过环境变量完成的。

Try something like: 尝试类似的东西:

heroku config:add DATABASE_URL=mysql://username:password@serveraddress:3306/databasename

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM