YMatrix
Quick Start
Simulate Time Series Scenarios
Standard Cluster Deployment
Data Modeling
Connecting to The database
Data Writing
Data Migration
Data Query
Maintenance and Monitoring
Performance Tuning
Troubleshooting
Reference Guide
Tool Guide
Data Type
Storage Engine
Execution Engine
Configuration Parameters
SQL Reference
FAQ
MatrixDB 4 also provides a Docker running environment, and the address in hub.docker.com is https://hub.docker.com/u/matrixdb.
Go to the home page and select matrixdb/centos7_demo:
The command to pull the mirror is provided on the right side of the page:
Execute the pull command in the terminal:
docker pull matrixdb/centos7_demo
After successful execution, you can see that the local repository already contains the latest version of the image:
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
matrixdb/centos7_demo latest 65d20762cc25 19 hours ago 1.65GB
Below, create a container based on the acquired image:
docker run -it -p 5432:5432 -p 8240:8240 --name mxdemo matrixdb/centos7_demo
-p parameter makes port mapping between host and container, with the purpose of connecting to the database in the container from the host. The format is
-p Host port: Container port
Database connection using port5432
Use port8240
in graphical management interface
After successful creation, use the Ctrl+P``
Ctrl+Q` command to exit.
View the running container:
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
87344882d280 matrixdb/centos7_demo "/home/mxadmin/entry…" 25 minutes ago Up 25 minutes 22/tcp, 7000/tcp mxdemo
Use the docker exec command to log in to the running container:
docker exec -it mxdemo /bin/bash
su - mxadmin
Next, you can use MatrixDB normally like the real environment:
[mxadmin@87344882d280 ~]$ psql
psql (12)
Type "help" for help.
mxadmin=#
In the host, use DBeaver to connect to the database in the container. After filling in the connection information according to the settings below, click Finish
. The default password is: changeme
DBeaver download address: https://dbeaver.io/download/
If you do not want to enter the Docker
container, you can execute psql
in the terminal to connect to MatrixDB, provided that the psql
command needs to be installed. If the psql
command has been installed, open the terminal and enter:
psql -h 127.0.0.1 -p 5432 -d mxadmin -U mxadmin
After executing the above command, you will be asked to enter a password for verification. The default password is: changeme
Use Chrome to access http://127.0.0.1:8240/, manage databases through a graphical interface, create and manage mxgate data import tasks.
The default administrator password is changeme
If you want to restart the MatrixDB graphical management interface, you need to enter the Docker container and execute under the root user:
/etc/init.d/matrixdb-supervisor restart
For more information about the functions related to the graphical management interface, please refer to the document:
For the convenience of trial use, the system allows any IP to access the database by default through username and password after installation, and the administrator password is changeme
.
To ensure your data security, please be sure to modify client connection authentication, password and other security settings as needed when using it.
Modify the pg_hba.conf configuration file to restrict client connections. For specific rules, please refer to the document: Client Authentication
After the modification is completed, you need to reload
pg_hba.conf
to make it take effect.gpstop -u
[mxadmin@87344882d280 ~]$ psql -d postgres
psql (12)
Type "help" for help.
postgres=# alter role mxadmin with password 'mxadmin';
ALTER ROLE