Using environment variables to create user@localhost

Using docker-compose to spin up the latest MariaDB image/instance:

... environment: MARIADB_ROOT_PASSWORD: ${DATABASE_SA_PASSWORD} MARIADB_DATABASE: ${DATABASE_NAME} MARIADB_USER: ${DATABASE_USERNAME} MARIADB_PASSWORD: ${DATABASE_PASSWORD} ... This config works and creates user@% granted full access to the specified database with the specified password... but instead I need it to create user@localhost, either in addition to or instead of user@%. Otherwise I have to dig into using the docker entrypoint for the container to run a SQL script to create the user and would rather not have to do that.

Is what I am asking for possible?


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.