myself DIVYANSHU RAJ , a undergrad at IIT-ROORKEE ,india .
i am getting following error while importing “latest.sql”
Nice to see you on the forums
I’m not sure what’s going on there, but what I would suggest is to completely remove the database and start from scratch.
Before importing, you’ll need to run the
./scripts/database-init-docker.sh script as explained in https://github.com/bookbrainz/bookbrainz-site#database-set-up
Let me know if that worked for you, and good luck !
actually i am doing my set up outside of docker ,and getting same error
what should i do in that case .
I had another look and tried the setup from scratch myself.
I updated slightly the manual database setup instructions, which you can find here:
the steps till setting up my database were fine, but now, there is a new error.
after the bzip2 command, i am not able to follow along. also, i have tried to uninstall and reinstall postgreSQL but with no improvement.
Any help/suggestion will be most welcomed.
hey ! @Prabhleen
i faced the same problem before .
you can follow these steps to solve that .
- find the PID of application running on 127.0.0.1 and port 5432
- kill the process with known PID
3.and restart the server of postresql .
commands to use on ubuntu , according to steps mentioned above;
- netstat -tnlp
it will list all programme and respective PID , just find the PID manually .
- kill “PID”
- sudo systemctl restart postgresql
if you don't find any PID , just do step 3
let me know if you got over this or not !!
@endurance21 thanks a lot!. apologies for the delay in replay. i am getting the following message.
it would be a great help, if you can guide.
sudo netstat -tnlp
and then find PID
sudo service postgresql restart instead of sudo systemctl restart postgresql
thanks a lot everyone! … everything just worked, and the database is set up but now the last command after setting the database is not working. @mr_monkey
this is the last one… thank you!
ya i also faced same problem, but did’nt get any solutions .
can you please help!
From just this information, I’m not sure I can help much.
I would need to see all of the output of the database setup commands; it’s likely that something went wrong along the way.
Was there anything that looked like an error message or a warning?
I would recommend starting from scratch (remove the bookbrainz database in postgres and start the process again), and copying all the output logs into a pastebin so that I can have a look.
i tried to find existing relations, and here is the output.
@mr_monkey, please tell if we can get anything from this output ,else, from where do i have to redo the work?
@mr_monkey i tried to solve the warning, that i got when running this command:
psql -h localhost -U postgres --command=“CREATE DATABASE bookbrainz”
WARNING: could not flush dirty data: Function not implemented
So, i did this:
and then after restarting the server, here is my output:
after giving the last command, it is asking for an input
For that last command that asks for an input, that’s because of quotation marks in the command you’re trying to run.
"SELECT name FROM "bookbrainz.editor" Instead of
"SELECT name FROM bookbrainz.editor" (note the extra
" in front of
If after that the query still throws that same “relation does not exist” error, then I recommend to
- Run these commands to delete the database entirely:
psql -h localhost -U postgres --command="DROP SCHEMA bookbrainz CASCADE"
psql -h localhost -U postgres --command="DROP SCHEMA musicbrainz CASCADE"
- Run again the command to import the database dump:
psql -h localhost -U postgres -f latest.sql
Please copy and paste the output of all of these commands into a pastebin (meaning copy all the text, rather than take an image screenshot): https://pastebin.com/
Hope it works, good luck!
@mr_monkey i tried the commands that you gave, with no change in the output.
It’s has been nearly a week, that i am trying to set this up!.
Thanks for your patience, I had a hard time finding out what the issue was.
I believe I have it now: when importing the database dump, there is a flag missing to specify the database. So it should be:
psql -h localhost -U postgres -d bookbrainz -f latest.sql
Let me know if that works for you, and I will update the docs accordingly.
And thanks for helping me identify that issue !
@mr_monkey Thanks a lot! It really solved a great issue!
OMG, I am so relieved.
Now, my node.js, dependencies and database are all set, just have to add the flow extension and i think, i am good to go.
So, thrilled that i can contribute now.
Glad that worked, and thanks again for helping me find the issue !
I look forward to seeing your contributions