Database Errors

MySQL 1049 Unknown Database

The specified database does not exist on the server.

Error · Database Errors

Meaning

MySQL could not find the database named in the connection request.

Causes

  • Database name misspelled
  • Database not created yet
  • Connecting to the wrong server

Fixes

  • Verify the database name
  • Create the database if it is missing
  • Check you are connecting to the correct server

Example

ERROR 1049 (42000): Unknown database 'app_db'

FAQ

  • Can this happen after a migration?
    Yes, if the DB was not created in the target environment.
  • Is this a permissions issue?
    No, it means the database name does not exist.

Contact

Contact your DBA to create the database or verify the server.