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
- Navigate to your database
- Go to the Databases tab
- Click Create database
- Enter a database name
- 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:
productionmy_appstaging_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:
- Go to the Databases tab
- Find the database you want to delete
- Click the delete button
- 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