phpmysqllaravelherokucleardb

After deploying Laravel project in Heroku MySQL doesn`t work


I have made my first Laravel project and tried to deploy it to the Heroku. It works, but when I tried to login or register it saying "SQLSTATE[HY000] [2002] Connection refused (SQL". There is my site: http://rocky-river-97869.herokuapp.com/login

After login should look like this: Do I have connect PhpMyAdmin separately? Thank you for you help


Solution

  • If yours Laravel project use MySQL you HAVE to use Heroku add-ons CLEARDB. In the link shows step by step how to solve the problem. It will be useful for newbie like me. https://mycodexp.wordpress.com/2016/05/19/deploying-laravel-app-to-heroku-using-mysql-database/