Report this

What is the reason for this report?

Where to Find Slow Query Logs in Managed Database (Already Enabled)?

Posted on August 22, 2025

Hi everyone,

I’ve already enabled the slow query log on my digital ocean managed database, but I’m not sure where to access or download the logs.

Specifically:

  • Where can I view or download the slow query logs?
  • Are they accessible through the cloud provider’s console, or do I need to use CLI/SQL queries?

Any guidance would be greatly appreciated. Thanks!



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

On DigitalOcean Managed Databases, you cannot directly access or download the slow query logs as a file. You must use a log forwarding integration, such as Datadog, to view and manage your database logs. DigitalOcean made this update in June 2024 to centralize log management for its managed databases.

Where to view your logs DigitalOcean’s Managed Databases now support log forwarding to third-party providers like Datadog.

  1. Enable log forwarding: In the DigitalOcean console, navigate to your database cluster. Go to the Settings or Log Forwarding section and configure a third-party log provider, such as Datadog, as the destination for your database logs.
  2. Use the third-party dashboard: Once configured, your slow query logs will be sent to the log provider. You can then view, analyze, and search your logs directly within that provider’s dashboard.

Access via CLI or API DigitalOcean also provides API-driven log forwarding, which allows you to programmatically configure log destinations for your managed database logs. You can also use doctl, the official DigitalOcean CLI, to interact with the API, but this is used for setting up the log forwarding, not for retrieving the logs directly.

Why direct file access is not an option Managed services like DigitalOcean’s Databases abstract away the underlying infrastructure. This means you do not have direct access to the file system where the database logs are stored, unlike with a self-hosted Droplet. For security, simplicity, and performance, DigitalOcean manages this aspect and provides more robust and integrated logging solutions.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.