sunetdrive/templates/mariadb/mysql.erb.sh

5 lines
174 B
Bash
Raw Permalink Normal View History

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