[英]Remote database not connecting with Java app
I have a java project and for that, I needed a remote database, I purchased a aws instance for public IP, installed MySql with PhpMyAdmin but the database is not connecting with the project via my public IP but if I use a ngrok port forward then it is connecting with the database, and the error its producting is: I have a java project and for that, I needed a remote database, I purchased a aws instance for public IP, installed MySql with PhpMyAdmin but the database is not connecting with the project via my public IP but if I use a ngrok port forward then它正在与数据库连接,其产生的错误是:
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
please help!!请帮忙!!
Ensure that the database has a public endpoint (ping it for instance in order to see that it has a public address).确保数据库具有公共端点(例如,ping 它以查看它具有公共地址)。 Then just check security group permissions.然后只需检查安全组权限。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.