Logical Databases

2 min read Updated 1 day ago

Logical Databases

A single managed database instance can host multiple logical databases. This is useful for running separate databases for different applications or environments while sharing the same infrastructure.

Default Database

Every managed database comes with a default database called defaultdb. You can use this for your application or create additional databases as needed.

Creating a Logical Database

  1. Navigate to your database
  2. Go to the Databases tab
  3. Click Create database
  4. Enter a database name
  5. Click Create

Database Naming Rules

Database names must:

  • Contain only lowercase letters, numbers, and underscores
  • Start with a letter or underscore
  • Not be a reserved name (e.g., mysql, postgres, information_schema)

Valid examples:

  • production
  • my_app
  • staging_v2

Use Cases

Common reasons to use multiple logical databases:

  • Multi-tenant applications - One database per tenant
  • Environment separation - Separate staging and production data on the same instance
  • Multiple applications - Different apps sharing the same database server
  • Microservices - Each service gets its own database

Deleting a Logical Database

To delete a logical database:

  1. Go to the Databases tab
  2. Find the database you want to delete
  3. Click the delete button
  4. Confirm the deletion

Warning: Deleting a logical database permanently removes all data stored in it. This action cannot be undone.

Next Steps

  • Database users - Grant user access to specific databases
  • Backups - Learn about automatic backup coverage