Skip to content

Direct Access to MMDB

In some cases, you may want to directly access your MetaMiner Database (MMDB).

You can add and update custom MMDB tables with a dynamic data import feature.

The following sections describe connecting to the MMDB from various tools. Take note that if you wish to make modifications to your MMDB directly, you will need a user account with read/write permissions.

Warning

Any changes to MMDB that are not approved or recommended by Infolytik Technical Support are strictly prohibited and will cause your warranty cancellation.

There are some typical situations when direct access to the MMDB may help:

  • Forcing updates of metadata after applying a MMTE update
  • Truncating outdated or corrupted data
  • Applying a hotfix directly to the MMDB

Tip

As MMDB in MMTE 5.2 is always a PostgresSQL database, you need some tool for managing PostgreSQL databases.

The most popular tools are:

  • psql: the standard Postgres client CLI utility
  • pgAdmin: this is a free standalone software with an easy-to-use GUI

Using psql

You can use the standard PostgreSQL client software to open MMDB.

psql screen

How to install and connect psql to MMDB:

  1. Download PostgreSQL client software for your operating system and platform.

    Read here how to do it.

  2. Install PostgreSQL client software.

  3. When installed, run psql CLI tool and connect it to MMDB using the following syntax:

    $ psql -h 172.11.22.33 -U mmuser -p 49614 -d metaminer
    Password for user mmuser: 
    psql (10.16 (Ubuntu 10.16-0ubuntu0.20.04.1), server 10.0)
    Type "help" for help.
    
    metaminer=# 
    

    where

    • 172.11.22.33 is the IP address of your PostgreSQL server

    • mmuser is the database usr account name

    • 49614 is the TCP/IP port on which PostgreSQL server is listening for requests

    • metaminer is the MMDB name

  4. Execute a test query against your MMDB.

Using pgAdmin

pgAdmin is a popular and feature-rich open source administration and development platform for PostgreSQL.

By default, MMTE ships pgAdmin3 (version 3) for establishing a connection to embedded MMDB (or for standalone Postgres 10 database). It is located in <METAMINER INSTALLATION DIRECTORY>\server\pgsql\pgadmin3\bin. In some cases, it can be faster than the latest pgAdmin version.

How to install the latest pgAdmin version:

  1. Download pgAdmin software package on your platform.

    Read here how to do it.

  2. Install pgAdmin Desktop and/or Web.

  3. When installed, run pgAdmin.

    pgAdmin GUI opens:

    pgAdmin screen

How to connect pgAdmin to MMDB:

  1. Choose Object – Create – Server Group.

    The Create – Server Group dialog box opens:

    Create Server Group

  2. Type in MetaMiner and click Save.

  3. A new server group appears.
  4. Select it and choose Create – Server.

    The Create – Server dialog box opens:

    Create Server

  5. On the General tab, specify its Name (any text) and add optional comments.

  6. On the Connection tab, specify at least the following credentials for your PostgreSQL server:

    • IP address/hostname
    • TCP/IP port
    • username
    • password

    Read here for details.

  7. On the SSL tab, choose your SSL mode (Required is recommended, read here for details).

  8. Settings on the SSH Tunnel and Advanced tabs are optional. Specify them, if they are required in your configuration.
  9. Click Save and wait while pgAdmin connects to your PostgreSQL server. On success, database tree and dashboard open:

    pgAdmin connected

  10. Execute a test query against your MMDB.

Back to top