Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You seem to be mistaking MusicBrainz-Server to be only the database. What's running on port 5000 is the Web Server. You can access <code>http://10.16.65.250:5000</code> in the browser.</p> <p>Postgres is also running, but listens on <code>localhost:5432</code>. This works:</p> <pre><code>import psycopg2 conn = psycopg2.connect(database="musicbrainz_db", user="musicbrainz", password="musicbrainz", port="5432", host="localhost") print("Connection established") </code></pre> <p>In order to make postgres listen to more than localhost you need to change <code>listen_addresses</code> in <code>/etc/postgresql/9.1/main/postgres.conf</code> and make an entry for your (client) host or network in <code>/etc/postgresql/9.1/main/pg_hba.conf</code>.</p> <p>My VM is running in a 192.168.1.0/24 network so I set <code>listen_addresses='*'</code> in postgres.conf and in pg_hab.conf:</p> <pre><code>host all all 192.168.1.0/24 trust </code></pre> <p>I can now connect from my local network to the DB in the VM.</p> <hr> <p>Depending on what you actually need, you might not want to connect to the MusicBrainz Server via postgres. There is a <a href="http://musicbrainz.org/doc/Development/XML_Web_Service/Version_2" rel="nofollow">MusicBrainz web service</a> you can access in the VM. Example: <code>http://10.16.65.250:5000/ws/2/artist/c5c2ea1c-4bde-4f4d-bd0b-47b200bf99d6</code>. In that case you might be interested in a library to process the data: <a href="http://python-musicbrainzngs.readthedocs.org/" rel="nofollow">python-musicbrainzngs</a>.</p> <p>EDIT: You need to set <code>musicbrainzngs.set_hostname("10.16.65.250:5000")</code> for musicbrainzngs to connect to your local VM.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload