From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 Received: from mail-lj1-f172.google.com (mail-lj1-f172.google.com [209.85.208.172]) by gnuweeb.org (Postfix) with ESMTPS id AA4F67E3A7 for ; Sun, 17 Apr 2022 14:17:38 +0000 (UTC) Authentication-Results: gnuweeb.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=BFEMxOeZ; dkim-atps=neutral Received: by mail-lj1-f172.google.com with SMTP id bn33so14322149ljb.6 for ; Sun, 17 Apr 2022 07:17:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=72wkno13Fczg4yuXcOtp/Blb0SuIaF3ZIhSXuZBYWTc=; b=BFEMxOeZaMPlfKMnXE6mVmTN2CdN6ElTAElSqYBmDWBG0Jfxf5MVHxvvKgMfvLUw18 DJrzggYCIc0Izv8jgPcli64yAOy8Q+wGTC/b6/AuwXJpQmtoPP6TnVRlqQGZuYuWsOMP j+SGeVPBluG76U+YCiZa0B4K+s4knT64h+RnVDsG0omxkTO/NngtRwFXo80Wgai77mbx zMDoLMN8ac3NMc83FugKW3a0hCxoQucvmHqvGwm5oiEQLzfMU3/wOnoFwBm0khgeBfdX TMJEWNjC12/Zpw75Rt4xouJt+pd5VvaPcyCeeuXXKsyS2r2mWLExvnh+5UoRGZFoEGPc lTaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=72wkno13Fczg4yuXcOtp/Blb0SuIaF3ZIhSXuZBYWTc=; b=UI/duUYrwfdtAOG/gTpdQW3VGKL8qv4AXnVxllhtsIjlWqbo7IihOjWN1VIT4eJvYu enQ5SQRT5n72wwpC8+8GkeGgEj0rLXwWX0dy0vl4dLndaPw723zMcCcqK8A48Udr1eaT d8/PA7baBbjRZlPTXCheY9bOBVNJZ6WM62Gc8pwZnWpP1W1hyKMzdliDrN1IO0QjUVEx ubZ4aTGGbOa982V7rvwAswsw2jk/hNkJ9bOr2K5D08hidKE35Xymj6cWzMj1wOXzVBrk LHH1TU7vjfTV50guTMCtgxwl3nvUdxucdyHx8+vGRWWtdEBHT4rEDGIHb4y5WTZwCbr3 WyaQ== X-Gm-Message-State: AOAM532yewN5VwFxRpIyO5GKR5sehEjeMq+qbbs/IkZ74sjJHFDq4Av4 adjHxJbW45bkpldnkIv5F9D8FJVas3aSkhxhpV4= X-Google-Smtp-Source: ABdhPJyv8d7RlWI15xsGclk+xNBpxM8GpGMseT9+kld+DwZCVUtZwO/1DyJg/1ti7QTlKCV7WlhqIPrsj7F9/j6y69o= X-Received: by 2002:a05:651c:b12:b0:24b:1338:1416 with SMTP id b18-20020a05651c0b1200b0024b13381416mr4887716ljr.92.1650205056903; Sun, 17 Apr 2022 07:17:36 -0700 (PDT) MIME-Version: 1.0 References: <20220417125125.160068-1-ammarfaizi2@gnuweeb.org> <20220417125125.160068-3-ammarfaizi2@gnuweeb.org> In-Reply-To: From: Alviro Iskandar Setiawan Date: Sun, 17 Apr 2022 21:17:25 +0700 Message-ID: Subject: Re: [PATCH server-a001 v1 2/2] Install MySQL server To: Ammar Faizi Cc: "GNU/Weeb Mailing List" , Hazmi Alfarizqi , Hazmi Alfarizqi , Alviro Iskandar Setiawan Content-Type: text/plain; charset="UTF-8" List-Id: On Sun, Apr 17, 2022 at 9:03 PM Ammar Faizi wrote: > On 4/17/22 8:52 PM, Alviro Iskandar Setiawan wrote: > > On Sun, Apr 17, 2022 at 8:45 PM Ammar Faizi wrote: > >> On 4/17/22 8:34 PM, Alviro Iskandar Setiawan wrote: > >>> On Sun, Apr 17, 2022 at 8:26 PM Ammar Faizi wrote: > >>>> On 4/17/22 8:06 PM, Alviro Iskandar Setiawan wrote: > >>> [...] > >>>>> Also, it needs persistent storage, container is temporary, but our > >>>>> database is permanent??? > >>>> > >>>> This is not a Dockerfile problem, it's a container problem. Which is > >>>> done at `docker run`. So there is no relevance with mounting host's > >>>> directory. > >>>> > >>>> The change is about Dockerfile. And we don't use a docker-compose.yml > >>>> here. I don't see the need to involve that. Yes? No? Comment? > >>> > >>> Yes, but how do you tell other maintainers to mount the volume > >>> correctly if you don't provide any mechanism in doing this? You should > >>> tell us how to run it too! > >> > >> OK, I understand your concern. > >> > >> The database file that needs to be persistent lives in /var/lib/mysql. > >> > >> So: > >> > >> docker run -v $HOST_DIR_FOR_MYSQL_DATA:/var/lib/mysql ... > >> > >> something like that... > >> > >> I will provide something for it in the v2. Anyway, since the mysql user > >> is managed by a database as well, this will be persistent across docker > >> run too. Hence, it's the host responsibility to retain the mysql users. > > > > I don't think we should retain mysql users! This may break with > > different database versions, the "mysql" table is an internal thing > > that shouldn't be exported. User setup should always be re-done at > > initialization. Maybe you can put it in docker-entrypoint.sh???? > > Huh, how come? > > By making the data persistent, I don't say we will export the "mysql" > table. If we ever upgrade, we will export and import. But this persistent > storage is meant to retain the data across docker run. Not across MySQL > versions. > > Our automatic backup is always doing mysqldump and we don't export the > "mysql" table here. oc, tq -- Viro