HomeMogDBMogDB StackUqbar
v2.0

Documentation:v2.0

Supported Versions:

Other Versions:

Quick Deployment of MogDB Single Instance Cluster

The ptk demo command can be used to quickly deploy a single-instance MogDB database and automatically install the associated plugins without having to provide a configuration file on the machine where the PTK resides.

Note: ptk demo relies on the internet to download the installation package.

Demonstration

Objectives

  • Provide a quick way for users to experience MogDB cluster.
  • Provides A compatibility mode database for Oracle compatibility testing.
  • Provides PG compatibility mode database for PostgreSQL compatibility testing.

Prerequisites

ptk demo applies to only the Linux operating system currently.

Before executing ptk demo, make sure that port 26000 is available. If you use other ports, use --port to specify a port.

MogDB Version

The default version is LTS.

Plugins

For a database of the oracle_compatibility mode, the following plugins will be installed:

Summary After Installation

Deploy Status:

  cluste_name |      host       | user | port  |    status     | message
--------------+-----------------+------+-------+---------------+----------
  demo_SWW    | 192.168.122.104 | demo | 26000 | start_success | success

Deployment status information:

  • cluster_name: cluster name
  • host: IP address of an instance
  • user: system user
  • port: port
  • status: deployment status
  • message: status description
Database Detail:

     item     |         value
--------------+-------------------------
user_password | Demo&Fth
  db_password | Demo&Fth
  app_dir     | /home/demo/demodb/app
  data_dir    | /home/demo/demodb/data
  tool_dir    | /home/demo/demodb/tool
  tmp_dir     | /home/demo/demodb/tmp

Database information:

  • db_password: initial password of a database
  • app_dir: app directory of a database
  • data_dir: data directory of a database
  • tool_dir: tool directory of a database
  • tmp_dir: temporary file directory of a database
Mode Compatibility:

  mode |        database        |        plugins        |               other
-------+------------------------+-----------------------+-------------------------------------
  PG   | postgres_compatibility | none                  |
  A    | oracle_compatibility   | whale[success]        |
       |                        | orafce[success]       |
       |                        | compat_tools[success] |
       |                        | mogila[success]       | db user: mogdb, password: Demo&SWW

Plugin Install Details:
  mode |    plugin    | status  |                       reference                       | error
-------+--------------+---------+-------------------------------------------------------+--------
  A    | whale        | success | https://docs.mogdb.io/zh/mogdb/v3.0/whale             |
       | orafce       | success | https://docs.mogdb.io/zh/mogdb/v3.0/orafce-user-guide |
       | compat_tools | success | https://gitee.com/enmotech/compat-tools               |
       | mogila       | success | https://gitee.com/enmotech/mogila                     |

Compatibility database information:

  • mode: compatibility mode
  • database: database name
  • plugins: plugin list of a database
  • other: comment

Database Connection

If the PTK user is installed in root, switch to the database user, and run gsql to connect the database.

If the database is installed as the common user, the database will be installed as the same user as the PTK. Therefore, you need to re-login or perform source ~/.bashrc to make the environment variable to take effect, and then run gsql to connect the database.

$ gsql -r
MogDB=# \l
                                        List of databases
          Name          | Owner | Encoding | Collate | Ctype | Access privileges | Compatibility
------------------------+-------+----------+---------+-------+-------------------+---------------
 oracle_compatibility   | demo  | UTF8     | C       | C     |                   | A
 postgres               | demo  | UTF8     | C       | C     |                   | A
 postgres_compatibility | demo  | UTF8     | C       | C     |                   | PG
 template0              | demo  | UTF8     | C       | C     | =c/demo          +| A
                        |       |          |         |       | demo=CTc/demo     |
 template1              | demo  | UTF8     | C       | C     | =c/demo          +| A
                        |       |          |         |       | demo=CTc/demo     |
(5 rows)
Copyright © 2011-2024 www.enmotech.com All rights reserved.