简体   繁体   English

docker-compose mysql 警告:--pid-file 的配置不安全

[英]docker-compose mysql warning: Insecure configuration for --pid-file

I installed windows home 18363 docker toolbox.我安装了 windows 家 18363 docker 工具箱。 I am trying to get the docker up, but you can also use the files and the results of the commands.我正在尝试启动 docker,但您也可以使用文件和命令结果。 Can you help me with this?你能帮我解决这个问题吗? where am i making a mistake?我在哪里犯错了?

the warning i got:我得到的警告:

Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. --pid-file 的不安全配置:所有操作系统用户都可以访问路径中的位置“/var/run/mysqld”。 Consider choosing a different directory.考虑选择不同的目录。

docker-compose.yaml docker-compose.yaml

version: "3"
services:
        trncmysql:
                build:
                        context: .
                        dockerfile: mysqldocker.yaml
                command: --sql_mode=
                volumes:
                        - "data-trncmysql:/var/lib/mysql"
                        - ./db/mysqlbackup.sql.gz:/docker-entrypoint-initdb.d/mysqlbackup.sql.gz
                container_name: trncMySQL
                ports:
                        - "33006:3306"
        trncnginx:
                build:
                        context: .
                        dockerfile: nginxdocker.yaml
                container_name: trncNginx
                ports:
                        - "8000:80"
                volumes:
                        - "./conf:/etc/nginx/conf.d/"
                        - "//c/blablabla/docker:/var/www/"
                links:
                        - trncphp
        trncphp:
                build:
                        context: .
                        dockerfile: php.yaml 
                container_name: trncPhp
                volumes:
                        - //c/blablabla/docker:/var/www/"
volumes:
        data-trncmysql:

$ docker-compose up $ docker-compose向上

result:结果:

`Recreating trncMySQL ... done                                                                                           Recreating trncNginx ... done`                                                                                           Attaching to trncPhp, trncNginx, trncMySQL
    trncPhp      | standard_init_linux.go:211: exec user process caused "no such file or directory"
    trncPhp exited with code 1
    trncMySQL    | 2020-05-23T09:46:37.689704Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
    trncMySQL    | 2020-05-23T09:46:37.689756Z 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not set.
    trncMySQL    | 2020-05-23T09:46:37.691212Z 0 [Note] mysqld (mysqld 5.7.27) starting as process 1 ...
    trncMySQL    | 2020-05-23T09:46:37.694771Z 0 [Note] InnoDB: PUNCH HOLE support available
    trncMySQL    | 2020-05-23T09:46:37.694983Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
    trncMySQL    | 2020-05-23T09:46:37.695063Z 0 [Note] InnoDB: Uses event mutexes
    trncMySQL    | 2020-05-23T09:46:37.695334Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
    trncMySQL    | 2020-05-23T09:46:37.695811Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
    trncMySQL    | 2020-05-23T09:46:37.696234Z 0 [Note] InnoDB: Using Linux native AIO
    trncMySQL    | 2020-05-23T09:46:37.696820Z 0 [Note] InnoDB: Number of pools: 1
    trncMySQL    | 2020-05-23T09:46:37.697442Z 0 [Note] InnoDB: Using CPU crc32 instructions
    trncMySQL    | 2020-05-23T09:46:37.699970Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
    trncMySQL    | 2020-05-23T09:46:37.710630Z 0 [Note] InnoDB: Completed initialization of buffer pool
    trncMySQL    | 2020-05-23T09:46:37.713189Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
    trncMySQL    | 2020-05-23T09:46:37.725341Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
    trncMySQL    | 2020-05-23T09:46:37.739894Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
    trncMySQL    | 2020-05-23T09:46:37.740397Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
    trncMySQL    | 2020-05-23T09:46:37.760327Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
    trncMySQL    | 2020-05-23T09:46:37.761769Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
    trncMySQL    | 2020-05-23T09:46:37.762078Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
    trncMySQL    | 2020-05-23T09:46:37.762823Z 0 [Note] InnoDB: Waiting for purge to start
    trncMySQL    | 2020-05-23T09:46:37.813575Z 0 [Note] InnoDB: 5.7.27 started; log sequence number 286336799
    trncMySQL    | 2020-05-23T09:46:37.814240Z 0 [Note] Plugin 'FEDERATED' is disabled.
    trncMySQL    | 2020-05-23T09:46:37.819356Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
    trncMySQL    | 2020-05-23T09:46:37.820642Z 0 [Warning] CA certificate ca.pem is self signed.
    trncMySQL    | 2020-05-23T09:46:37.821354Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
    trncMySQL    | 2020-05-23T09:46:37.825810Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
    trncMySQL    | 2020-05-23T09:46:37.826825Z 0 [Note] IPv6 is available.
    trncMySQL    | 2020-05-23T09:46:37.827179Z 0 [Note]   - '::' resolves to '::';
    trncMySQL    | 2020-05-23T09:46:37.827429Z 0 [Note] Server socket created on IP: '::'.
    trncMySQL    | 2020-05-23T09:46:37.826732Z 0 [Note] InnoDB: Buffer pool(s) load completed at 200523  9:46:37
    trncMySQL    | 2020-05-23T09:46:37.829648Z 0 [Warning] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
    trncMySQL    | 2020-05-23T09:46:37.848458Z 0 [Note] Event Scheduler: Loaded 0 events

$ docker ps $ docker ps

CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                                NAMES
ab8dc52f46f2        docker_trncmysql    "docker-entrypoint.s…"   6 minutes ago       Up 6 minutes        33060/tcp, 0.0.0.0:33006->3306/tcp   trncMySQL
61e2957ad66d        docker_trncnginx    "nginx -g 'daemon of…"   6 minutes ago       Up 6 minutes        0.0.0.0:8000->80/tcp                 trncNginx

it actually looks like it works but it doesn't.它实际上看起来有效,但它没有。 help please.请帮忙。

command: --pid-file /var/lib/mysql/mysqld.pid

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM