- About PTK
- Quick Start
- Guidance
- Preparing Configuration File
- Checking the System
- Deploy Database Cluster
- Manage Clusters
- Show Cluster List
- Show Cluster Status
- Start Database
- Stop Database
- Restart Database
- Rebuild Database
- Switchover
- Failover
- Show Plugin Information
- Install Plugins
- Upgrade Database
- Scale-out Cluster
- Scale-in Cluster
- Show Database HBA
- Set Database HBA
- Show Database Parameters
- Set Database Parameters
- Show Cluster Topology Configuration
- Show Cluster Meta Information
- Update Cluster Comment
- Update Database IP
- Role Management
- Install CM
- Uninstall CM
- Manage Cluster VIP
- Install MogHA Service
- Uninstall MogHA Service
- Rename Cluster
- Create Empty Cluster
- Throw Out A Node
- Takeover A Node
- Manage Cluster
- Uninstall Database Cluster
- Collect OS Information
- Download MogDB Installer
- Encrypt Sensitive Information
- Upgrade PTK
- PTKC
- Compatible With Higher Versions of MogDB
- Reference
- Samples of Configuration Files
- Commands
- ptk
- ptk completion
- ptk view-static-config
- ptk init-cluster
- ptk collect
- ptk rec-guc
- ptk cache
- ptk gen-ptkc
- ptk manage
- ptk demo
- ptk meta
- ptk version
- ptk self
- ptk gen-om-xml
- ptk env
- ptk gen-static-config
- ptk cluster
- ptk cluster createdb
- ptk cluster uninstall-compat-tools
- ptk cluster install-compat-tools
- ptk cluster install-mogila
- ptk cluster rename
- ptk cluster throwout
- ptk cluster takeover
- ptk cluster uninstall-cm
- ptk cluster install-cm
- ptk cluster gen-cert-files
- ptk cluster load-cm-vip
- ptk cluster del-kerberos-auth
- ptk cluster add-kerberos-auth
- ptk cluster uninstall-kerberos-server
- ptk cluster install-kerberos-server
- ptk cluster is-in-upgrade
- ptk cluster upgrade-rollback
- ptk cluster upgrade-commit
- ptk cluster upgrade
- ptk cluster demote
- ptk cluster promote
- ptk cluster refresh
- ptk cluster shell
- ptk cluster modify-comment
- ptk cluster show-config
- ptk cluster set-guc
- ptk cluster show-guc
- ptk cluster set-hba
- ptk cluster show-hba
- ptk cluster scale-out
- ptk cluster scale-in
- ptk cluster uninstall-mogha
- ptk cluster install-mogha
- ptk cluster list-plugins
- ptk cluster install-plugin
- ptk cluster inspect
- ptk cluster failover
- ptk cluster switchover
- ptk cluster build
- ptk cluster status
- ptk cluster restart
- ptk cluster stop
- ptk cluster start
- ptk uninstall
- ptk ls
- ptk install
- ptk exec
- ptk template
- ptk encrypt
- ptk checkos
- ptk download
- ptk candidate
- Troubleshooting
- FAQ
- Release Notes
- Community
- Appendix: YAML Syntax
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)