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.8 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,NO_DNS_FOR_FROM, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from [192.168.88.87] (unknown [36.80.217.41]) by gnuweeb.org (Postfix) with ESMTPSA id 458E97E3A7; Sun, 17 Apr 2022 14:03:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1650204185; bh=M4FUpG7OKPQUZ8NlUwwDRbAgUSpD6Gufw/fZGjgK/Fk=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=NJ1ouBY76k3RLsvIPOmrPw949IupauQ6mVEv+tZByK0x+QlvO1M8CjE+Rx9DGlAdj tGE8jFG9gksQlSt1XxOK3AIHUBoWpWd3nM+Lzndpnub7xw9tdF6lojjCX3DMsFUlxN ZEuP9ItKcPjsBXuCka8xozYjVwiyAQCd97yHF0yLp1kyqm7nsCm8D+6OBUwyeEVVpj CxBinz3gOP9rFgAoK7zxxNNlZ7j3I6xt/sY/J+4EiKwX3/kj0SRqdKOAFYZ2dGW8ah BQG+gppmJ+ncYgmtfDGrv/+DvA8YDfE1R85DBd+XdITLj2RU00KH4o33NByRrpPrWi 1UtZI7rsF1dFg== Message-ID: Date: Sun, 17 Apr 2022 21:02:58 +0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH server-a001 v1 2/2] Install MySQL server Content-Language: en-US To: Alviro Iskandar Setiawan Cc: GNU/Weeb Mailing List , Hazmi Alfarizqi , Hazmi Alfarizqi , Alviro Iskandar Setiawan References: <20220417125125.160068-1-ammarfaizi2@gnuweeb.org> <20220417125125.160068-3-ammarfaizi2@gnuweeb.org> From: Ammar Faizi In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: 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. -- Ammar Faizi