我是靠谱客的博主 贤惠镜子,最近开发中收集的这篇文章主要介绍dockercompose配置jira连接mysql失败dockercompose启动jira,mysql,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

dockercompose配置jira连接mysql失败

  • dockercompose启动jira,mysql
    • jira启动后配置数据库出错
    • 解决方法

dockercompose启动jira,mysql

参考下面文章进行安装:https://blog.csdn.net/weixin_37558119/article/details/113246972
https://blog.csdn.net/weixin_37558119/article/details/113246972
dockercompose文件:

services:
mysql:
image: mysql/mysql-server:5.7
container_name: yanfa_mysql
restart: always
ports:
- "3306:3306"
volumes:
- ./mysql/data:/var/lib/mysql
- ./mysql/conf/my.cnf:/etc/mysql/my.cnf
environment:
MYSQL_ROOT_PASSWORD: 123456
MYSQL_ROOT_HOST: "%"
networks:
- esnet
jira:
image: atlassian/jira-software:8.5.1
container_name: jira
restart: always
ports:
- "8080:8080"
environment:
CATALINA_OPTS: -javaagent:/opt/atlassian/jira/atlassian-agent.jar
volumes:
- ./jira/data:/var/atlassian/application-data/jira
- ./libs/mysql-connector-java-5.1.42.jar:/opt/atlassian/jira/lib/mysql-connector-java.jar
- ./libs/atlassian-agent.jar:/opt/atlassian/jira/atlassian-agent.jar
networks:
- esnet
networks:
esnet:

包文件可以上面链接文章中找到。

jira启动后配置数据库出错

jira进行数据库连接测试错误,出现了红色提示:Establishing SSL connection without server‘s identity verification is not recommended.等
查看docker mysql日志出现了BAD HANDSHAKE的提示,说明数据库地址是对的。
因为客户端对mysql5.7以上连接时要加上useSSL=true或者false,jira连接mysql没有设置,不知道是不是版本问题。

解决方法

docker mysql载入自己编写的配置文件my.cnf,跳过mysql的ssl验证,添加:

# disable_ssl
skip_ssl

栗子:

[client]
port = 3306
socket = /var/lib/mysql/data/mysql.sock
[mysqld]
# disable_ssl
skip_ssl
# 针对5.7版本执行group by字句出错问题解决
sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'
# 一般配置选项
basedir = /var/lib/mysql
datadir = /var/lib/mysql/data
port = 3306
socket = /var/lib/mysql/data/mysql.sock
lc-messages-dir = /usr/share/mysql # 务必配置此项,否则执行sql出错时,只能显示错误代码而不显示具体错误消息
character-set-server=utf8mb4
back_log = 300
max_connections = 3000
max_connect_errors = 50
table_open_cache = 4096
max_allowed_packet = 32M
#binlog_cache_size = 4M
max_heap_table_size = 128M
read_rnd_buffer_size = 16M
sort_buffer_size = 16M
join_buffer_size = 16M
thread_cache_size = 16
query_cache_size = 64M
query_cache_limit = 4M
ft_min_word_len = 8
thread_stack = 512K
#tx_isolation = READ-COMMITTED
tmp_table_size = 64M
#log-bin=mysql-bin
long_query_time = 6
server_id=1
innodb_buffer_pool_size = 1024M
innodb_thread_concurrency = 16
innodb_log_buffer_size = 16M
wait_timeout= 31536000
interactive_timeout= 31536000
lower_case_table_names = 1

最后

以上就是贤惠镜子为你收集整理的dockercompose配置jira连接mysql失败dockercompose启动jira,mysql的全部内容,希望文章能够帮你解决dockercompose配置jira连接mysql失败dockercompose启动jira,mysql所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(26)

评论列表共有 0 条评论

立即
投稿
返回
顶部