1 创建元数据库
Dinky 采用 mysql 作为后端的存储库,mysql 支持 5.7+
Dbeaver 链接 mysql执行
CREATE DATABASE dinky;
create user 'dinky'@'%' IDENTIFIED WITH mysql_native_password by 'dinky';
grant ALL PRIVILEGES ON dinky.* to 'dinky'@'%';
flush privileges;
2 上传dinky到/opt/upload
3 解压dinky
cd /opt/upload
tar -zxvf dinky-release-1.18-1.0.0-rc4.tar.gz -C /opt/software/
4 重命名dinky
cd /opt/software
mv dinky-release-1.18-1.0.0-rc4 dinky-1.0.0
5 初始元化数据库
mysql -uroot
use dinky;
source /opt/software/dinky-1.0.0/sql/dinky-mysql.sql;
6 修改application.yml
cd /opt/software/dinky-1.0.0/config
vim application.yml
修改以下内容:h2替换为mysql
active: ${DB_ACTIVE:mysql}
7 修改application-mysql.yml
cd /opt/software/dinky-1.0.0/config
vim application-mysql.yml
修改以下内容
spring:
datasource:
url: jdbc:mysql://${MYSQL_ADDR:192.168.154.131:3306}/${MYSQL_DATABASE:dinky}?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&zeroDateTimeBehavior=convertToNull&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
username: ${MYSQL_USERNAME:dinky}
password: ${MYSQL_PASSWORD:dinky}
driver-class-name: com.mysql.cj.jdbc.Driver
8 复制flink依赖到dinky
cp /opt/software/flink-1.18.1/lib/* /opt/software/dinky-1.0.0/extends/flink1.18/
9 替换 flink-table-planner-loader-1.18.1.jar
cp /opt/software/flink-1.18.1/opt/flink-table-planner_2.12-1.18.1.jar /opt/software/dinky-1.0.0/extends/flink1.18/
rm -rf /opt/software/dinky-1.0.0/extends/flink1.18/flink-table-planner-loader-1.18.1.jar
10 复制mysql驱动包到dinky
cp /opt/upload/mysql-connector-java-8.0.27.jar /opt/software/dinky-1.0.0/lib/
11 启动dinky
cd /opt/software/dinky-1.0.0
./auto.sh start 1.18
12 登录web端
默认用户名密码为:admin/admin
13 停止dinky
cd /opt/software/dinky-1.0.0
./auto.sh stop