线上不行,数据库都连不上。本地可以!为什么呢??

注册报错
Whoops, looks like something went wrong

vagrant@homestead:~/code/Laravel$ heroku pg:reset DATABASE --confirm samoyedsun
Resetting postgresql-animated-81117... done
vagrant@homestead:~/code/Laravel$ heroku run php artisan migrate
Running php artisan migrate on ⬢ samoyedsun... up, run.4979 (Free)
**************************************
*     Application In Production!     *
**************************************

 Do you really wish to run this command? (yes/no) [no]:
 > yes

In Connection.php line 664:

  SQLSTATE[HY000] [2002] Connection refused (SQL: select * from information_schema.tables where table_schema = forge and tabl
  e_name = migrations)

In Connector.php line 67:

  SQLSTATE[HY000] [2002] Connection refused
MR_Z
《L05 电商实战》
从零开发一个电商项目,功能包括电商后台、商品 & SKU 管理、购物车、订单管理、支付宝支付、微信支付、订单退款流程、优惠券等
《L02 从零构建论坛系统》
以构建论坛项目 LaraBBS 为线索,展开对 Laravel 框架的全面学习。应用程序架构思路贴近 Laravel 框架的设计哲学。
讨论数量: 3

出现了同样的错误, 待大神帮忙解决

file

5年前 评论
Master-Xue

可以重启虚拟机试试,我的问题在重启后解决了。 或者重新按照教程配置推送以后,在重启尝试!!!

5年前 评论

@beatles 第三遍了,还出错, 原因是 config/database.php 文件中漏了这一行

'default' => $db_config['connection']
5年前 评论

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!