I know that MySQL/MariaDB can be configured at the system level to use a custom path rather than
/var/lib/mysql. This requires restarting the service.
Is there any way to just run a one-off sql command against a given data directory? My use case is a shell script initializing and setting up a directory before creating a Docker container with that directory bind-mounted to the container's MySQL data directory. I don't want this to require changing anything running on the system.