What you might see
You may see: `target database is required`, `select target DB in replication job`, or `Snapshot apply failed`.
Snapshot / Sync · error · admin
Snapshot jobs need a resolved target database. Cupcake can get that from the replication job, the saved mapping, or the target connection default depending on the run path.
target_database_required: target database is required (select target DB in replication job)
You may see: `target database is required`, `select target DB in replication job`, or `Snapshot apply failed`.
- The replication job did not include `target_database_name`.
- The saved mapping does not have a target database.
- The target connection has no default database.
- A scheduled run path did not hydrate the job from the saved mapping.
- The target database was removed or renamed after the mapping was saved.
1. Open the saved mapping and confirm Source Database and Target Database are set.
2. Confirm the target connection can access the target database.
3. If this happened from Scheduler Run Now, retry after the schedule/job hydration fix is deployed.
4. If needed, recreate the snapshot job from Snapshot / Sync and select the target database explicitly.
5. Confirm the target database exists or allow Cupcake to create it when that workflow supports creation.
Prefer saving mappings with explicit source and target databases. Avoid relying only on connection-level default databases for production schedules.
```sql
SELECT DATABASE();
SHOW DATABASES LIKE 'target_database_name';
SHOW GRANTS FOR CURRENT_USER();
```