# Accessing data from the postgresql server

**URL:** <https://community.metabrainz.org/t/accessing-data-from-the-postgresql-server/711898>\
**Category:** Development\
**Tags:** database, en, musicbrainz\
**Created:** [August 31, 2024, 9:26am UTC](https://community.metabrainz.org/t/accessing-data-from-the-postgresql-server/711898 "2024-08-31T09:26:48Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![derat](https://community.metabrainz.org/letter_avatar_proxy/v4/letter/d/71c47a/32.png) [@derat](https://community.metabrainz.org/u/derat)\
**Post date:** [August 31, 2024, 11:53am UTC](https://community.metabrainz.org/t/accessing-data-from-the-postgresql-server/711898/4 "2024-08-31T11:53:25Z")

</div>

(It might make sense for an admin to merge this into your earlier thread at [https://community.metabrainz.org/t/converting-data-to-a-sqllite3-database/708651](https://community.metabrainz.org/t/converting-data-to-a-sqllite3-database/708651).)

I agree with the earlier comment that trying to get the data into SQLite will be a ton of work. It’ll be easier to just use PostgreSQL, especially if you already have it set up.

IIRC, you should be able to run something like this in your `musicbrainz-docker` checkout to get a [psql](https://www.postgresql.org/docs/current/app-psql.html) prompt:

```sh
sudo docker-compose run musicbrainz psql postgres -U musicbrainz -h db

```

After that, you should be able to query it like you would any SQL database. There are a lot of pages online describing PostgreSQL-specific commands. A few from a search:

- [PostgreSQL: Documentation: 7.0: psql](https://www.postgresql.org/docs/7.0/app-psql.htm)
- [Psql | Postgres Guide](https://www.postgresguide.com/utilities/psql/)
- [Top psql commands and flags you need to know | PostgreSQL](https://hasura.io/blog/top-psql-commands-and-flags-you-need-to-know-postgresql)
- [https://www.commandprompt.com/education/postgresql-basic-psql-commands/](https://www.commandprompt.com/education/postgresql-basic-psql-commands/)
- etc.

If there’s something specific that you’re trying to do and having problems with, please describe it.

---

_[View the full topic](https://community.metabrainz.org/t/accessing-data-from-the-postgresql-server/711898)._
