Add mysql command to host

This commit is contained in:
Micke Nordin 2024-10-04 10:00:50 +02:00
parent 4111ac7500
commit 1ecf6c8128
Signed by untrusted user: Micke
GPG key ID: 0DA0A7A5708FE257

View file

@ -1,4 +1,4 @@
#!/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}" "${@}"
docker exec -ti mariadb_db_1 mysql -u root -p"${pw}" -e "${@}"