Problem scenario
Your Java program returns this message: “com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Unknown database foobar”
What should you do?
Possible solution #1
Are you using Amazon Aurora? AWS has a MySQL PaaS offering. You may have a section of the Java code that looks like this:
Connection con=DriverManager.getConnection(“jdbc:mysql://foobar-us-west-2b.abcdefghijk.us-west-2.rds.amazonaws.com:3306/foobar”)
Remove the last “foobar” from the end. The connection string should look like this for Aurora databases:
jdbc:mysql://foobar-us-west-2b.abcdefghijk.us-west-2.rds.amazonaws.com:3306/foobar
Recompile the program.
…