Database settings

Hello !

I got peertube install with Yunhost, and then while configurating my peertube (first tweaking) I’m in front of a little issue that has been solve by chocobuzz here :

DELETE FROM actor WHERE "preferredUsername" = '...' and "serverId" is null;

but how to enter the database ? I’m really new and don’t want to destroy the stuff in there ^^’

Thank you !

Coucou !

j’ai une instance peertube installée avec Yunohost, et en configurant celle là, (mes débuts de réglage), je me trouve face à un problème résolu ici par chocobuzz lui-même :sweat_smile:

DELETE FROM actor WHERE "preferredUsername" = '...' and "serverId" is null;

mais comment entrer dans la database sans créer de soucis particuliers ?

merci !

ahh et je suis sur raspPi4B ! — using RaspPi4B !

Hey !
Nobody knows ? ^^’

probably something like

sudo su  # To become root, if not already root

then psql peertube

Thank you, That seems to work. But i need to figure out the password now. Not working with all those I’ve made on either peertube & yunohost.

I’m logged into root@192…
Or admin@192… Both ask for a database password

I’ll dig later, and post here the anwser !

If you want catch-all approach go for

sudo -u postgres psql --dbname=peertube --command="<some SQL statement>"

However, that runs as user postgres which is equivalent with running as DB root user. If you want surgical strike Peertube’s DB user name is peertube, password is obtainable with

sudo yunohost app setting peertube db_pwd
Then you can use it as
psql --username=peertube -W --dbname=peertube --command="<some sql>", and when prompted for password paste what previous command shown. User peertube should only be entitled to peertube DB so if you make any mistake only that app is affected.

Also, I’d strongly recommend making app backup before running random SQL from the internet, just in case things go horribly wrong.


This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.