Database Error 500 when upgrading to external MySql database

After using the internal hsql db, I'm in the process of converting our Confluence instance to MySql (on an AWS EC2 box). After entering in the db credentials I get an Apache Tomcat 500 error as follows:

HTTP Status 500

org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: Could not execute query; uncategorized SQLException for SQL []; SQL state [3D000]; error code [1046]; No database selected; nested exception is java.sql.SQLException: No database selected

On the "Configure Database" page, this is the information I enter for Database URL: jdbc:mysql://myawsec2.us-east-1.rds.amazonaws.com:3306/. I don't enter the database name there (though maybe I should?) I also don't have the database name included in confluence.cfg.xml, as follows:

<property name="hibernate.connection.url">jdbc:mysql://myawsec2.us-east-1.rds.amazonaws.com:3306/</property>

Should the database name be included in one/both of those locations? I feel like I've tried that, but I'm not positive. (I've tried both "jdbc:mysql://myawsdbname.myawsec2.us-east-1.rds.amazonaws.com:3306/" and "jdbc:mysql://myawsec2.us-east-1.rds.amazonaws.com:3306/myawsdbname/").

Any ideas?

 

2 answers

1 accepted

Hi Randall,

Yes when setting up the database JDBC connection, you will have to specify the database URL along with the name as well. So for an example, I think the following database URL should work:

jdbc:mysql://myawsec2.us-east-1.rds.amazonaws.com:3306/myawsdbname

Hence, can you kindly try to apply this and see if it helps?

If the problem remains, may I know how did you configure the database connection? Did you make changes directly to the confluence.cfg.xml?

Thanks.

I'm getting the same thing here?

I've tried 50 different ways to get this to work and I still get:

HTTP Status 500 - java.lang.NullPointerException

Any ideas?

When moving databases, is there anything else I need to do except re-direct the JDBC URL?

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

2,896 views 27 12
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you