Im trying to upload my web app and database to heroku but I keep getting that error "Can't connect to MySQL server on 'localhost' (111)". I was able to upload the static part of my website but when I try to login in or create an account I get that error. I have looked online and a suggestion said I need to change the bind-address on the file my.cnf however, I did that and I keep getting that error.I do not know what is the issue. Perhaps I have missed configured my app to connect to the remote database? Anyway, thank you in advance
Asked
Active
Viewed 113 times
0
-
Where is your database hosted? – Jakob L Dec 02 '20 at 19:52
-
Im a little bit newbie here so pardon me if I do not exactly reply what you are excpection to. If you mean what DBMS Im using it is Mysql. And Im trying to upload my local database to heroku using Cleardb. I hope that answered your question – Franco Dec 02 '20 at 20:17
-
https://fuzzyblog.io/blog/heroku/2019/10/16/importing-your-local-mysql-database-into-heroku.html – Jakob L Dec 02 '20 at 20:19
-
I did just that but when I run the command to import my database to the new one I get this message: ERROR 2005 (HY000): Unknown MySQL server host 'us-cbdr-east-02.cleardb.com' (0) – Franco Dec 02 '20 at 21:05
-
Someone else got the same error on a different post and was referred to this post: https://stackoverflow.com/questions/9822313/remote-connect-to-cleardb-heroku-database – Jakob L Dec 03 '20 at 19:46
-
Following those instrutions I was able to move my local database info to herokus. But I keep getting internal server error and on heroku console this: mysql.connector.errors.DatabaseError: 2003 (HY000): Can't connect to MySQL server on 'localhost' (111). I looked up that error and they say it has something to do with the bind-address, I commented that line and still get that error. Besides when I ping the server no packets are recieved. – Franco Dec 03 '20 at 20:39