Can I access database (mysql) logs?

Posted January 3, 2020 2.8k views
MySQLDigitalOcean Managed MySQL Database

I have a mysql cluster, I can go to the “Logs and Queries” tab and see what I need. But I would like to have access to the logs to associate them with my elasticsearch. Can I access the log files? How are database queries stored as a log file or in the database itself?

edited by bobbyiliev

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.

Submit an Answer
3 answers

Hi @degorych,

Since the database is managed by DigitalOcean it isn’t possible to access the cluster to directly access the logs.

The general_log file can be seen under the “Queries” sub-tab of your database cluster.

It’s being looked at for the future but at this time it’s not possible.


@KFSys Unacceptable. We should have access to full db logs or at least a way to tail them. Fix it asap.

  • Hello @degorych,

    I understand it’s an important feature. What I can suggest is to submit it as a feature request. You can submit that feature request:

  • I agree. A warning to anyone who stumbles upon this. Digital Ocean does NOT let you see logs at all. They have their slowquerylog set to 1000 so it will cut off anything useful in their ‘Logs & Metrics’ section. I am in the process of migrating away from DO because of this, their support team WILL NOT help you!

Hi DigitalOcean,

This is really disappointing. Can you then atleast support addition of pgaudit extension. This will definitely push me to AWS :(.

Customers need a proper audit trail.