赞
踩
在编写海豚的部署脚本时,遇到MySQL的jdbc连接报错问题,发现这与hive部署里MySQL的jdbc连接也不同
mysql> select version();
+-----------+
| version() |
+-----------+
| 8.0.31 |
+-----------+
1 row in set (0.00 sec)
SPRING_DATASOURCE_URL="jdbc:mysql://$hostname:3306/dolphinscheduler?useSSL=false&useUnicode=true&characterEncoding=UTF-8"
把useSSL=false 改为 useSSL= true
SPRING_DATASOURCE_URL="jdbc:mysql://$hostname:3306/dolphinscheduler?useSSL=true&useUnicode=true&characterEncoding=UTF-8"
增加allowPublicKeyRetrieval=true
SPRING_DATASOURCE_URL="jdbc:mysql://$hostname:3306/dolphinscheduler?allowPublicKeyRetrieval=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8"
这两种方案都测试过,都可行。建议方案二,增加allowPublicKeyRetrieval=true
SPRING_DATASOURCE_URL="jdbc:mysql://$hostname:3306/dolphinscheduler?useSSL=false&useUnicode=true&characterEncoding=UTF-8"
Caused by: com.mysql.cj.exceptions.WrongArgumentException: Malformed database URL, failed to parse the connection string near ';useUnicode=true&characterEncoding=UTF-8'
不要用& 直接用&
例如
SPRING_DATASOURCE_URL="jdbc:mysql://$hostname:3306/dolphinscheduler?allowPublicKeyRetrieval=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8"
乐于奉献共享,帮助你我他!
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。