Search code examples
javamysqlamazon-web-servicesintellij-ideajdbc

Failed to retrieve JMX service url when attempting AWS/mySQL DB connection via intellij


I've made the leap towards learning AWS and unfortunately have hit an impass, it would seem. When attempting to launch my application, I'm receiving a notification of "Failed to retrieive application JMX service URL".

The peculiar thing about this is, my connection is successfully authenticated via AWS and Workbench, however when launching the application it's seemingly attempting to connect with a different usernam specified in appliation.properties or anywhere else for that matter.

Although not good practice, I've been attempting to connect via my admin account through AWS which is further mirrored within workbench, however the error returned is specifying my IRL name which isn't specified anywhere other than the "Remote Management" panel in DB connections within workbench. This being SSH connectivity url, which is specified never to be used. I'm unsure whether or not this is where it's being read from, although certain it's the only place being referenced. I've made an attempt at disabling this, which it currently is - Still reads the same name. I've made attempts at creating and granting authorities to a user of this username within my DB and still no avail.

java.sql.SQLException: Access denied for user 'removed for safety' (using password: YES)

The above is the error returned, which again specifies a username not declared anywhere for use (other than SSH remote management which is unused) and an IP address which is unrecognised.

Following creation of a new user within both AWS and mySQL DB the error message changes to the following:

java.sql.SQLException: null,  message from server: "Host' is not allowed to connect to this MySQL server"

Any help would be greatly appreciated as I've now tried everything within my currently limited knowledge base.

Attempted configuring user within AWS and mySQL matching credentials attempting access - Hoping authorisation would be granted, although simply changed the error message. Conducted research, although not coming across anything related to AWS/mySQL connectivity related, or varying issues.


Solution

  • I rebuilt both mySQL and AWS in the exact same way and it's now working. Unsure as to what or why, but there's quite literally no amendments in settings, or code for that matter.