Files
coreapp-dev/core/needs/mysql/teardown
T
davidandClaude Opus 5.5 8ef2112e3c Add the mysql need: its own database on the Core's MariaDB
needs = ["mysql"] (coreapp new --mysql) makes a user and database
coreapp_<name> on pdnsmysql, with the same DB_* settings as postgres
(so an app has one or the other). Root's password is read inside the
container, so it stays out of installapp's set -x log.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 15:15:23 -07:00

6 lines
235 B
Plaintext

# Drop its database and user from the Core's MariaDB (pdnsmysql)
docker exec -i pdnsmysql sh -c 'MYSQL_PWD="$MYSQL_ROOT_PASSWORD" exec mariadb -uroot' <<SQL
DROP DATABASE IF EXISTS {{DBNAME}};
DROP USER IF EXISTS '{{DBNAME}}'@'%';
SQL