zabbix-server 使用mysql帐号带ssl认证临时处理办法

       在搭建zabbix监控平台时,zabbix-server配置数据库帐号密码之后,出现了mysql创建的zabbix用户开启了ssl认证,导致zabbix-server启动时无法通过ssl而连接失败,zabbix-server服务无法正常启动,以下是临时解决的方法。

1、将mysql的ssl认证先临时关闭

使用超管帐号登录mysql数据库,然后命令行输入

SET GLOBAL require_secure_transport = OFF;

2、将zabbix用户ssl认证方式关闭

alter user 'zabbix'@'%' require none;
flush privileges;

此时,先验证zabbix-server服务器是否可以正常启动,若正常,再进行第三步

3、将mysql的ssl认证开关还原

SET GLOBAL require_secure_transport = ON;

以上只是临时处理方法,若大家有更好的处理方式,欢迎评论区留言!

version: "3.8" networks: zabbix-net: driver: bridge ipam: config: - subnet: 172.20.0.0/24 services: mysql-server: image: mysql:8.0.36 container_name: mysql-server restart: unless-stopped environment: MYSQL_DATABASE: zabbix MYSQL_USER: zabbix MYSQL_PASSWORD: Zmsl@123 MYSQL_ROOT_PASSWORD: Zmsl@123 TZ: Asia/Shanghai command: > --default-authentication-plugin=mysql_native_password --character-set-server=utf8 --collation-server=utf8_bin volumes: - mysql_data:/var/lib/mysql - mysql_logs:/var/log/mysql - mysql_conf:/etc/mysql/conf.d ports: - "3306:3306" networks: zabbix-net: ipv4_address: 172.20.0.10 zabbix-java-gateway: image: zabbix/zabbix-java-gateway:alpine-6.2-latest container_name: zabbix-java-gateway restart: unless-stopped environment: TZ: Asia/Shanghai networks: zabbix-net: ipv4_address: 172.20.0.20 zabbix-server-mysql: image: zabbix/zabbix-server-mysql:6.2-alpine-latest container_name: zabbix-server-mysql restart: unless-stopped depends_on: - mysql-server - zabbix-java-gateway environment: DB_SERVER_HOST: mysql-server MYSQL_DATABASE: zabbix MYSQL_USER: zabbix MYSQL_PASSWORD: Zmsl@123 MYSQL_ROOT_PASSWORD: Zmsl@123 ZBX_JAVAGATEWAY: zabbix-java-gateway ZBX_JAVAGATEWAY_TIMEOUT: 30 ZBX_START_POLLERS: 5 ZBX_START_POLLERS_UNREACHABLE: 1 TZ: Asia/Shanghai volumes: - /data/zabbix/alertscripts:/usr/lib/zabbix/alertscripts:ro - zabbix_server:/etc/zabbix - /data/zabbix/server:/var/lib/zabbix - /data/zabbix/log:/var/log/zabbix ports: - "10051:10051" networks: zabbix-net: ipv4_address: 172.20.0.30 zabbix-web-nginx-mysql: image: zabbix/zabbix-web-nginx-mysql:alpine-6.2-latest container_name: zabbix-web-nginx-mysql restart: unless-stopped depends_on: - mysql-server - zabbix-server-mysql environment: PHP_TZ: Asia/Shanghai ZBX_SERVER_HOST: zabbix-server-mysql DB_SERVER_HOST: mysql-server MYSQL_DATABASE: zabbix MYSQL_USER: zabbix MYSQL_PASSWORD: Zmsl@123 MYSQL_ROOT_PASSWORD: Zmsl@123 ports: - "7099:8080" networks: zabbix-net: ipv4_address: 172.20.0.40 zabbix-agent: image: zabbix/zabbix-agent:alpine-6.2-latest container_name: zabbix-agent restart: unless-stopped environment: ZBX_HOSTNAME: zabbix-server-docker ZBX_SERVER_HOST: zabbix-server-mysql ZBX_SERVER_PORT: 10051 ZBX_PASSIVE_ALLOW: "true" ZBX_ACTIVE_ALLOW: "true" volumes: - zabbix_agent:/etc/zabbix ports: - "10050:10050" networks: zabbix-net: ipv4_address: 172.20.0.50 cap_add: - NET_RAW - NET_ADMIN volumes: mysql_data: mysql_logs: mysql_conf: zabbix_server: zabbix_agent:
最新发布
08-20
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

hu_wenjie

您的鼓励将是我创作最大的动力!

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值