Docker installs Dameng (DM) relational database, and DBeaver uses the database for remote connection.

Docker installs Dameng (DM) relational database

First, you have to go to the Dameng Database official website to register an account.

Download database deployment package

Official website: https://www.dameng.com/

Then find the required database:
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Official website trial address: https://eco.dameng.com/tour/?source_url=https://www.dameng.com/list_103 .html
Insert image description here
Insert image description here

Docker deployment database

Insert image description here
Load the DM database image into the docker image and execute the following command:

docker load < dm8_20220822_rev166351_x86_rh6_64_ctm.tar

Check whether the image is loaded successfully:
Insert image description here

Start and run the DM database

Because of test use, we only do basic mapping here.

docker run -d --name dm8_single -p 5236:5236 dm8_single:v8.1.2.128_ent_x86_64_ctm_pack4
 
 
# 不使用的时候,停止数据库
docker stop dm8_single
 
# 需要使用的时候,启动数据库
docker start dm8_single

Check whether the startup is successful.

Insert image description here

Remote connection using database

Connect to the DM database remotely, using the DBeaver tool here.
Insert image description here
You need to download the DM database connection driver DmJdbcDriver in advance.

Driver download address: https://eco.dameng.com/document/dm/zh-cn/app-dev/java-MyBatis-Plus-frame.html

Insert image description here
Start connecting to the database and configure the driver.
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here

Connect to the database

Insert image description here
Insert image description here
Default username: SYSDBA Password: SYSDBA001

Insert image description here

Insert image description here
Insert image description here
Insert image description here
Basic SQL statement:

CREATE TABLE employee
(
employee_id INTEGER,
employee_name VARCHAR2(20) NOT NULL,
hire_date DATE,
salary INTEGER,
department_id INTEGER NOT NULL
);
 
 
INSERT INTO employee VALUES
(9999, '王达梦','2008-05-30 00:00:00', 30000, 666);
 
 
SELECT * FROM employee;
 
 
UPDATE employee SET salary='35000' WHERE employee_id=9999;

Insert image description here

Guess you like

Origin blog.csdn.net/u011019141/article/details/131111164