sunetdrive/templates/mariadb/mysql.erb.sh
2024-10-21 16:27:21 +02:00

5 lines
174 B
Bash

#!/bin/bash
pw=$(yq -r '.services.db.environment[0]' /opt/mariadb/docker-compose.yml | awk -F '=' '{print $2}')
docker exec -ti mariadb_db_1 mysql -u root -p"${pw}" "${@}"