A ready-to-run MySQL 8.4 container, preloaded with seven sample databases. Used by AnswerLayer engineers as a local data source for development and demos.
docker compose up -dFirst boot takes a couple of minutes while the dumps in init/ are restored.
Subsequent starts are instant — the data lives in the mysql-data named
volume. To reset to a clean state:
docker compose down -v && docker compose up -d| Setting | Value |
|---|---|
| Host (from host machine) | localhost or 127.0.0.1 |
| Host (from another Docker container) | host.docker.internal |
| Port | 3306 |
| App user | answerlayer / answerlayer |
| Root user | root / sandbox |
| Default DB | scratch |
Example:
mysql -h 127.0.0.1 -P 3306 -u answerlayer -panswerlayer| Database | Source / license |
|---|---|
sakila |
Sakila Sample Database — © Oracle, New BSD License |
world |
World Sample Database — © Oracle, Creative Commons Attribution-ShareAlike 3.0 |
employees |
datacharmer/test_db — CC-BY-SA 3.0 |
airline_loyalty |
Maven Analytics — Airline Loyalty Program (free sample dataset; ~391k flight-activity rows + ~17k loyalty-history rows, Canadian carrier, 2017–2018) |
astronomy |
NASA / STScI — exoplanets from the NASA Exoplanet Archive PSCompPars table, jwst_archive from the MAST JWST archive. Both are US-government public-domain data. |
finance |
Synthetic transaction data generated for testing — no real customers. Schema mirrors a typical retail-banking transaction table. |
scratch |
Empty database for ad-hoc work |
./csv/ on the host is mounted at /var/lib/mysql-files/csv/ inside the
container, and local-infile is enabled:
LOAD DATA INFILE '/var/lib/mysql-files/csv/my_file.csv'
INTO TABLE my_table
FIELDS TERMINATED BY ',' ENCLOSED BY '"'
LINES TERMINATED BY '\n'
IGNORE 1 ROWS;The official mysql:8.4 image automatically executes any .sql, .sql.gz,
or .sh file in /docker-entrypoint-initdb.d/ on first boot of an empty
data volume. The init/ directory in this repo is mounted there. Files are
prefixed with a number so they run in a deterministic order.
Repository configuration is MIT licensed (see LICENSE). The SQL dumps in
init/ retain their original third-party licenses; see the table above.