0

In my Amazon RDS Dashboard, the configuration details of my DB instance (running MySQL) mentions that my DB name is ebdb, which is the default one, I haven't changed it. It's the same screen as here, instead that I don't want to change the instance name.

I've managed to connect to this DB using MySQL Workbench and I've imported a schema carpool which now lies alongside the existing ebdb one:

MySQL Workbench Navigator

In the config of my app I've specified this DB url: jdbc:mysql://${DB_HOST}:3306/carpool, DB_HOST being the endpoint specified in the RDS Dashboard.

If my app tries to access the DB it throws an error because it can't find the table. I assume that's because it looks in the wrong database.

In the RDS Dashboard, placing the cursor on the label DB Name gives some info, including An Amazon DB instance can host multiple databases. Then why is the name of the database hard-coded ebdb ?

How can I access another database in my RDS instance ?

4
  • are You use same user for Workbench and for application?
    – a_vlad
    Commented Oct 30, 2016 at 10:16
  • Yes the user is the right one. If it wasn't I assume that the error message would rather be something like 'access to DB refused'. Commented Oct 30, 2016 at 13:50
  • Is the user you are using allowed to see only the one database? What is the exact text of the error?
    – Rick James
    Commented Oct 30, 2016 at 17:21
  • It's a Hibernate error: HHH000262: Table not found. You mean that a user may have acces to one database and not another on the same instance? How can I see what database the user has access to? Commented Oct 30, 2016 at 20:46

1 Answer 1

0

Well, I was living in a lie.

The simple reason why I couldn't access my table on RDS was because RDS runs on Linux and MySQL table names are case-sensitive on Linux, while my local DB runs on Windows where MySQL table names are not case-sensitive.

About multiple databases in a single RDS instance: RDS does accept multiple databases. It's just that, for an unknown reason, only the initial database of the instance is always displayed in the dashboard. This still doesn't make sense to me because this database has nothing more than other ones, apart being the first one.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.