#!/bin/sh # Grant existing androidcast app user access to url_shortener (after schema import as root). # Password is NOT stored here — same as examples/crash_reporter/backend/config/config.php db.mysql.password # # Usage (on BE): # mysql -u root -p < sql/schema.mariadb.sql # ./scripts/init-mariadb-grants.sh set -eu DB_NAME="${URL_SHORTENER_DB_NAME:-url_shortener}" DB_USER="${URL_SHORTENER_DB_USER:-androidcast}" echo "Granting ${DB_USER}@localhost and @127.0.0.1 on ${DB_NAME}.* ..." mysql -u root -p <