The discussion revolves around accessing the Discourse database, particularly in a Docker setup. Users seek ways to view and edit the database, with suggestions including using the Data Explorer Plugin for a safer, GUI-like experience. For direct access via the command line, the recommended approach is to enter the container using ./launcher enter app, switch to the discourse user, and then use psql discourse to connect to the database. The correct command to run PostgreSQL commands as the postgres user is sudo -u postgres psql discourse. Users are reminded that commands in psql must end with a semicolon, and that \dt lists tables, while \d [table] shows table structure. A detailed guide is provided by neounix for beginners, emphasizing the importance of testing on a staging environment before making changes to production. profcaju also asks about connecting via external SQL clients like PSequel, and DScryber inquires about using the Data Explorer plugin to list accessible databases.
This is probably a stupid question but how can I access the database?
Is there something equivalent to phpadmin (or another GUI) that I can use to view and edit the database of discourse? If not, then what is the best way to access/view/edit it?
Könntest du diesen Vorgang bitte erklären? Ich bin ein Neuling im Bereich Container und würde gerne anfangen, mit meiner PostgreSQL-Datenbank zu experimentieren, anstatt den Container wie eine große Blackbox zu behandeln
Gibt es eine Möglichkeit, sich mit einer Discourse-Datenbank (selbst gehostete Docker-Installation) über einen SQL-Client (wie PSequel für Mac) zu verbinden?
Abgesehen von der Verwendung von Docker, womit ich nicht vertraut bin (und die DB nicht beschädigen möchte), gibt es SQL-Befehle, die ich über das Data Explorer-Plugin ausführen könnte, um die Namen der Datenbanken anzuzeigen, auf die ich in Discourse zugreifen kann?