Question

Access Database from Directus One-Click Installation Droplet

Hi.

I’m using a Digtalocean-Droplet for Hosting a directus.io-installation. Just for context, directus is some kind of headless cms, running on node.js. It stores the entered data in a MySQL or PostgreSQL database.

My question is: How can I access the database, where the data ist stored from my installation? Via the console? I need that access, because i need to delete some stuff in that database…

Thanks für your help!


Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

I have the same question.

I would like to know how to save the database managed by the CMS Directus. (created with one-click install from DigitalOcean).

Any idea to do this?

Hi there @leamoser,

It looks like that the Directus One-Click Installation Droplet uses PostgreSQL and not MySQL.

In order to access PostgreSQL via the command line you could run the following command:

  • Then switch to the postgres user:
sudo su postgres
  • Access the directus database:
psql directus
  • To list all available tables run:
\d
  • Then you could run your SQL queries as normal.

Hope that this helps! Regards, Bobby