Trying to access MB database through pgAdmin and VirtualBox

virtualmachine
musicbrainz-vm
Tags: #<Tag:0x00007f0763e7b8c0> #<Tag:0x00007f0763e7b780>

#21

@thistimenextyear Hi, I have the same error message that you struggled. Could you explain how you get docker and ip address information in the screenshot? I would like to know if you make any changes in the setting.


#22

Hi change000,

Sure, try doing the following:-

type in docker ps

When I do this I get a couple of lines returned. Look for the line that says the port 5432 and take a note of the container id, mine says 598d32af7efd.

type in docker inspect 598d32af7efd |pg or whatever your container id is.

You will see from the output something that says NetworkSettings, look for the line that says IPAddress. Make a note of the IPAddress, mine says 172.17.0.2

Now enter psql -h 172.17.0.2 -U musicbrainz or whatever your IPAddress is.

You will then be prompted to enter your password.

Hope this helps, if you have any problems then ping me.


Help extracting data from database (for academic research)
#23

Thank you. This helped.


#24

Hi thistimenextyear, your responses in this thread got me this far, so thank you so much for all the help. I am now able to access the musicbrainz database within the VM, and run psql queries successfully.

The problem I’m having is - I don’t know how to extract the results out to my main OS so that I can use it in some analysis. I tried setting up pgadmin4 but I keep getting the error “FATAL: role “musicbrainz” does not exist”. See below for the settings I’m using in both pgAdmin4 and the virtualbox NAT settings.

Would appreciate hearing your recommendations on what I could try next… Thanks!

I can only post one image into this thread, so here’s the dropbox link to the image Virtualbox NAT settings screenshot


#25

Don’t forget to run the bin/reset-containers command from vagrant after you update your docker-compose.yml file!! I finally was able to figure it out and access the db from my OS. thanks all for the support.


#26

Probably it’s me, but could someone plase resume what I have to do to get it working? What I have to to in docker-compose.yml ?

thanks a lot!


#27

No, you should use the regular command prompt once you have logged in with the vm. This way you can actually see progress if things are happening. To do this, once you open your cmd prompt, type “ssh -p 2222 vagrant@localhost” enter. then password


#28

Hi thistimenextyear,

once i apply the psql -h 172.17.0.2 -U musicbrainz
it asks for a password, what would this be? or what steps do i take to create one

Thank you!