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:
Official website trial address: https://eco.dameng.com/tour/?source_url=https://www.dameng.com/list_103 .html
Docker deployment database
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:
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.
Remote connection using database
Connect to the DM database remotely, using the DBeaver tool 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
Start connecting to the database and configure the driver.
Connect to the database
Default username: SYSDBA Password: SYSDBA001
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;