0

We have an RDS aurora mysql instance that has been up and running for a while without issue, however, today our application's connection to the db failed, with error ERROR 1049 (42000): Unknown database 'campspot_development'.

Things we've tried:

Connecting to the database without specifying the db name is successful:

mysql -h write.staging-database.campspot.com -u campspot_staging -p

SHOW DATABASES; returns the database in question.

mysql> SHOW DATABASES; +----------------------+ | Database | +----------------------+ | information_schema | | campspot_development | +----------------------+ 2 rows in set (0.01 sec)

If we connect using the string above and query USE campspot_development it is unsuccessful. But if we run a query with the schema prefixed to the table, it works.

SELECT * FROM campspot_development.Park;

Connecting while specifying the db is not successful, resulting in the Unknown database error: mysql -h write.staging-database.campspot.com -u campspot_staging -p campspot_development

What could be causing the database to be queryable and show in the list of databases, but stopping it from being connected to directly?

  • Sounds like a bug for RDS – Rick James Oct 18 at 16:43
  • "USE campspot_development it is unsuccessful." What does "unsuccessful" actually mean? There are at least two possible error messages that would point in very different directions. – Michael - sqlbot Oct 19 at 13:13
  • I agree, this seems to be a problem with RDS. Hopefully support gets back to us one day... USE campspot_development returns the same error as when trying to connect to the schema. ERROR 1049 (42000): Unknown database 'campspot_development' – user193130 Oct 22 at 18:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.