Registry / database / dagster-mysql

dagster-mysql

JSON →
library0.29.10pypypi✓ verified 85d ago

A Dagster integration library for MySQL, providing a MySQLEventLogStorage and MySQLRunStorage for persisting Dagster event logs and run metadata in MySQL. Compatible with Dagster 1.13.x (library version 0.29.x). Released as part of the main Dagster monorepo on a weekly cadence.

pip install dagster-mysql
INSTALL
IMPORT
SIG · DAGSTER-MYSQL
D
dagster-mysql
databasepythonv0.29.10
Install
13.3s avg
Import
4451ms
Disk
170MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.29.10 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 4.570s · 135MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 13.3s · import 4.332s · 191MB
170MB installed
● package 170MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

MySQLEventLogStorage
from dagster_mysql import MySQLEventLogStorage
Use dagster_mysql, not a submodule like dagster_mysql.storage.
MySQLRunStorage
from dagster_mysql import MySQLRunStorage
Use dagster_mysql, not a submodule.
dagster_mysql
import dagster_mysql
Simple import works; the library auto-exports the main classes.

Basic setup to connect MySQL event log and run storage. Requires a running MySQL server.

from dagster_mysql import MySQLEventLogStorage, MySQLRunStorage # Example configuration dict for the MySQL storage backends config = { "mysql_host": os.environ.get("MYSQL_HOST", "localhost"), "mysql_port": int(os.environ.get("MYSQL_PORT", "3306")), "mysql_user": os.environ.get("MYSQL_USER", "root"), "mysql_password": os.environ.get("MYSQL_PASSWORD", ""), "mysql_db_name": os.environ.get("MYSQL_DB_NAME", "dagster"), } # Create storage instances event_log_storage = MySQLEventLogStorage.from_local(**config) run_storage = MySQLRunStorage.from_local(**config) # Verify connection (raises if cannot connect) print("Connected to MySQL successfully.")
Debug
Known issues
gotchaMySQLEventLogStorage and MySQLRunStorage are not drop-in replacements for the default Postgres-based storages. They have different schema and may not support all features (e.g., certain query optimizations).
fix
Review the Dagster documentation for MySQL storage limitations.
affects: all
gotchaThe MySQL storage backends use `mysql-connector-python` under the hood. If you encounter connection issues, ensure the MySQL server is reachable and the credentials are correct. The `from_local` method does not use environment variables by default; you must pass them explicitly.
fix
Explicitly provide `mysql_host`, `mysql_port`, etc., either via code or environment.
affects: all
deprecatedAs of Dagster 1.13, `MySQLScheduleStorage` has been deprecated in favor of using a centralized schedule storage via Dagster Cloud or the core Postgres storage. Direct MySQL schedule storage may be removed in future versions.
fix
Migrate schedule storage to the default Dagster storage backend (Postgres).
affects: >=1.13.0
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'mysql'
Missing mysql-connector-python dependency.
fix
Install mysql-connector-python: `pip install mysql-connector-python`
OperationalError: (mysql.connector.errors.OperationalError) 1045 (28000): Access denied for user 'root'@'...'
Invalid MySQL credentials or host not allowed to connect.
fix
Verify MYSQL_USER, MYSQL_PASSWORD, and that the user has remote access permissions.
ImportError: cannot import name 'MySQLEventLogStorage' from 'dagster_mysql'
Old versions of dagster-mysql (<0.28) exported from submodules; the preferred import path changed.
fix
Use `from dagster_mysql import MySQLEventLogStorage`. If using an older version, import from `dagster_mysql.event_log`.
Upgrade
Version history
0.29.10latest on PyPI · released Jun 18, 2026
Audit
Dependencies
dagsterrequiredCore dependency; dagster-mysql is an extension plugin.
mysql-connector-pythonrequiredRequired for MySQL connectivity.
Agent activity
25 hits · last 30 days
node
22
OpenAI (training)
1
Resources
dagster-mysql — pip install dagster-mysql · libregistry