• mysql-unknown-option-in-kubernetes错误


    错误问题

    原因:把MySQL的用户密码配置成secrets,然后挂载mysql,mysql会一直报错,无法完成初始

    Version: '5.7.33'  socket: '/var/run/mysqld/mysqld.sock'  port: 0  MySQL Community Server (GPL)
    2021-04-07 15:06:32+08:00 [Note] [Entrypoint]: Temporary server started.
    Warning: Unable to load '/usr/share/zoneinfo/iso3166.tab' as time zone. Skipping it.
    Warning: Unable to load '/usr/share/zoneinfo/leap-seconds.list' as time zone. Skipping it.
    2021-04-07T07:06:58.526144Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 24159ms. The settings might not be optimal. (flushed=200 and evicted=0, during the time.)
    Warning: Unable to load '/usr/share/zoneinfo/zone.tab' as time zone. Skipping it.
    Warning: Unable to load '/usr/share/zoneinfo/zone1970.tab' as time zone. Skipping it.
    2021-04-07 15:06:58+08:00 [Note] [Entrypoint]: Creating database wordpress
    mysql: [ERROR] unknown option '--"'

    解决问题

    问题是我使用该echo 'secret' | base64命令创建了我的机密,而echo命令自动插入了结尾的换行符。

    使用echo -n 'secret' | base64代替。✔️

    因此我没有注意到日志输出中有换行符。希望这可以帮助一些也使用echo命令对base64进行编码的人。

    参考文章: https://stackoverflow.com/questions/62985541/mysql-unknown-option-in-kubernetes#

    人生得意须尽欢,莫使金樽空对月。 天生我材必有用,千金散尽还复来。
  • 相关阅读:
    python 装饰器
    python 环境迁移之requirements.txt (window环境)
    selenium 元素查找与属性
    pytest+allure(allure-pytest基于这个插件)设计定制化报告
    Capability配置
    python_excel
    python_连接mysql
    MySql_1
    appium_环境搭建
    appium_appium简介
  • 原文地址:https://www.cnblogs.com/heian99/p/14634946.html
Copyright © 2020-2023  润新知