Closed ranadeep-sh closed 5 years ago
You are setting \"hostname\": \"127.0.0.1\",
in the user provided service which won't work. When your app runs it will get this value and try to connect to 127.0.0.1 which is the container itself, not your computer, where MySQL is actually running.
You need to put an actual routable IP for your hostname and you need to make sure that it's accessible from a container running on PCF Dev. To test, push an app, then cf ssh
into the app and then just see if you can nc -v <hostname> 3306
. If you get a message that says it established a TCP connection then you've found the right hostname.
Hope that helps!
Thanks Daniel. You are awesome. Yes. It did work after using the DHCP-assigned IP Address while creating the user-provided service for the database.
My app [gs-spring-boot.zip] is unable to connect to the locally running MySQL 8.0 database after carrying out the following configurations as described in various tutorials online.
Please find the errors in the attached log file named [cf_spring_boot_log.txt]
Please find a screenshot of the MySQL account with same credentials as configured below.
I have spent weeks with no success. Please let me know what I am missing in my configuration.