How do I fix the "Unknown Database" error when connecting to MySQL?

Validated on 20 Nov 2024 • Last edited on 18 Mar 2026

ERROR 1049 (42000): Unknown database 'default'

An Unknown Database error occurs when:

  • You connect to the wrong cluster.
  • You connect to a database that doesn’t exist in your specified cluster.

If you are getting this error:

  • Verify that you are using the correct hostname to connect.
  • Verify that you’ve created the database in your cluster of choice.
How do I fix the mysqldump "Couldn't execute FLUSH TABLES Access denied" error?

Update backup user permissions, remove the –single-transaction flag, or downgrade mysqldump.

Why does MySQL shut down when importing data with the source command?

Use MySQL’s import command instead of source for handling large data imports.

How do I fix the "1227" error?

Remove or replace the DEFINER in the dump file.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.