我知道为什么条件判断通不过了,因为我是用官方的greatsql镜像启动后重新打包的,
这期间已经初始化过了,所以不会再次初始化。
但现在有有个问题,datadir = /data/GreatSQL 是判断条件,
我把容器里的 /data/GreatSQL 全部删除,然后重新打包成镜像,应该就可以了吧?但现在直接启动不了了,也没明显的报错
下附启动页面的日志
[root@lavm-5e5kztdhpl Documents]# docker run -it --name greats greats:latest /bin/bashChecking directory: /var/lib/mysql/mysqlGreatsql init data done.Greatsql check var/lib/mysql: true[Note] You specify none of MYSQL_ROOT_PASSWORD, MYSQL_ALLOW_EMPTY_PASSWORD and MYSQL_RANDOM_ROOT_PASSWORDGreatSQL create root@localhost with **EMPTY PASSWORD**Initializing database/bin/bash: --initialize-insecure: invalid optionUsage: /bin/bash [GNU long option] [option] ... /bin/bash [GNU long option] [option] script-file ...GNU long options: --debug --debugger --dump-po-strings --dump-strings --help --init-file --login --noediting --noprofile --norc --posix --rcfile --rpm-requires --restricted --verbose --versionShell options: -ilrsD or -c command or -O shopt_option (invocation only) -abefhkmnptuvxBCHP or -o optionDatabase initializedInitializing certificatesIgnoring -days; not generating a certificateGenerating a RSA private key................+++++.+++++writing new private key to 'ca-key.pem'-----Ignoring -days; not generating a certificateGenerating a RSA private key....................................................................................................+++++...................................................................+++++writing new private key to 'server-key.pem'-----Ignoring -days; not generating a certificateGenerating a RSA private key..........+++++..................+++++writing new private key to 'client-key.pem'-----Certificates initialized/bin/bash: --skip-networking: invalid optionUsage: /bin/bash [GNU long option] [option] ... /bin/bash [GNU long option] [option] script-file ...GNU long options: --debug --debugger --dump-po-strings --dump-strings --help --init-file --login --noediting --noprofile --norc --posix --rcfile --rpm-requires --restricted --verbose --versionShell options: -ilrsD or -c command or -O shopt_option (invocation only) -abefhkmnptuvxBCHP or -o optionMySQL init process in progress...MySQL init process in progress...MySQL init process in progress...MySQL init process failed.