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 utilitypgAdmin
: 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.
How to install and connect psql
to MMDB:
-
Download PostgreSQL client software for your operating system and platform.
Read here how to do it.
-
Install PostgreSQL client software.
-
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
-
-
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:
-
Download
pgAdmin
software package on your platform.Read here how to do it.
-
Install pgAdmin Desktop and/or Web.
-
When installed, run pgAdmin.
pgAdmin GUI opens:
How to connect pgAdmin
to MMDB:
-
Choose Object – Create – Server Group.
The Create – Server Group dialog box opens:
-
Type in MetaMiner and click Save.
- A new server group appears.
-
Select it and choose Create – Server.
The Create – Server dialog box opens:
-
On the General tab, specify its Name (any text) and add optional comments.
-
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.
-
On the SSL tab, choose your SSL mode (Required is recommended, read here for details).
- Settings on the SSH Tunnel and Advanced tabs are optional. Specify them, if they are required in your configuration.
-
Click Save and wait while pgAdmin connects to your PostgreSQL server. On success, database tree and dashboard open:
-
Execute a test query against your MMDB.
See Also