SQLSTATE[HY000] [2002] Connection refused for the database server host name 127.0.0.1.
2 Answers
I think there is something error with your database credential
as per your image that is what I understand May be you have written wrong db credential
check list for you
Create Db user at your server
Set password for that user
Create Blank database
and put those right credential at here
-
Thank you Murtuza,but I can do all those things locally with xampp server.but i have no idea how to do that in heroku.when i deployed magento2 to heroku ,it just showed me that client interface– vigneshCommented Jan 9, 2017 at 7:38
-
@vignesh as per your image I think you are trying this at live site Commented Jan 9, 2017 at 8:00
-
-
@vignesh how can you connect your local database with cloud ?? create database at your cloud environment Commented Jan 9, 2017 at 8:06
-
yes murtuza,i thought that heroku would provide mysql default for the deployed application.but it wont provide mysql it seems.can you suggest me a way to implement database for magento in heroku– vigneshCommented Jan 9, 2017 at 8:08
I believe Heroku uses database urls to convey the DB connection information that it has configured. you can use heroku config --app APPNAME to get the connection url which you can then enter in the web install wizard.
127.0.0.1
tolocalhost