Root Password Change - How can I stop the mysqld in the mariadb container

Hi, I am using the mariadb container with podman, and in order to make it run, I need to pass in mysql_root_password as an environment variable. I am not entirely convinced that this is secure, as the root password is then both left in an environment variable inside the container (which is exposed to localhost inside a pod), and is recorded as part of the command line to podman run, in the file referenced by the podman inspect command, which outputs a json string with the root password recorded in the commandline arguments. So, since I can't hide that command line, I thought I would try and change the root users password, obtaining the password from user input in a script that would then issue a set of podman exec commands to stop mysqld, start mysqld_safe etc However, I can't find a way of stopping mysqld without it restarting. Is there a way to do this? Or to start the mariadb container and not pass the database root password in an environment variable? MTIA

Answer Answered by James Stewart Miller in this comment.

I ended up setting no password, and then using mysql_secure_installation to set the password.

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.