galnir / Master-Bot

A Discord music bot and dashboard with slash commands, playlist support, Spotify, music quiz, saved playlists, lyrics, gifs and more
MIT License
464 stars 373 forks source link

Error: P1000: Authentication failed against database server at `localhost` #793

Closed Natemo2625 closed 1 year ago

Natemo2625 commented 1 year ago

Every time I try to run the bot, I keep getting "Error: P1000: Authentication failed against database server at localhost, the provided database credentials for natemo are not valid." I am trying to run this on Debian 12 with nodejs v18.13.0. I previously got it to work on Ubuntu, but I can't figure it out now. Any help would be appreciated.

Bacon-Fixation commented 1 year ago

Howdy @Natemo2625 , I have run into this before, if you can, try logging into your postgres db with the terminal and make sure the account is valid. May have to recreate the account if it's a new database as well when you moved to the other OS, the other is to make sure the url for the db is valid in your .env

Much Love -Bacon

Natemo2625 commented 1 year ago

Ok before I try that, I just got an idea. Can I have it connect to a DB on a different computer on the same network? If so I can save some trouble lol

Edit: I have Debian installed on a different computer that I'm trying to host on because of some performance issues, but keeping the DB on there should be fine if all else fails

Natemo2625 commented 1 year ago

Alright now I'm getting "Error: Migration engine error: db error: ERROR: permission denied to create database"

Edit: I've switched back to Ubuntu so that hopefully there's a better chance for me to get it to work lol

Natemo2625 commented 1 year ago

I've finally got it working. After reading through psql help, I found out how to give permissions to my psql user. Granted I just gave it superuser instead of specific permissions, but at least it works now.

Natemo2625 commented 1 year ago

Ok I have a new problem, opening a new issue for it