Install
openclaw skills install @extraskittles/test-mysql-dbConnect to test-environment MySQL databases for troubleshooting, data verification, schema inspection, and controlled validation queries. Use when the user asks to query or validate test/dev database data, investigate test-environment issues, check whether new Java/service code wrote expected records, inspect table structure, compare before/after data, or perform explicitly approved low-risk data correction in a test MySQL database.
openclaw skills install @extraskittles/test-mysql-dbUse this skill to query and validate test-environment MySQL data while keeping credentials and write operations controlled.
INSERT, UPDATE, DELETE, DDL, or stored procedure calls, get explicit user confirmation in the current conversation and state the target environment, database, table, predicate, expected row count, and rollback plan first.DELETE, unconstrained UPDATE, DROP, TRUNCATE, or schema changes unless the user explicitly asks and the target is confirmed as a disposable test database.LIMIT, and transactions where possible. For write validation, capture before/after query results.Find connection details from the safest available source:
application-dev.yml, application-test.yml, Nacos/Apollo/local config, Docker Compose, .env, CI variables, or documented runbooks.TEST_MYSQL_HOSTTEST_MYSQL_PORTTEST_MYSQL_USERTEST_MYSQL_PASSWORDTEST_MYSQL_DATABASEIf multiple test databases are plausible, identify the service/module and ask only for the missing disambiguation.
rg to find mapper XML, repository methods, entity classes, migration files, and datasource config.SELECT * when the table is wide or sensitive.scripts/mysql_query.py when Python MySQL drivers are available, or use the local mysql client if the environment already provides it.For new code that writes database data:
For explicit test-data fixes:
Use scripts/mysql_query.py for repeatable CLI execution:
python scripts/mysql_query.py --sql "select 1"
python scripts/mysql_query.py --database order_deve --sql-file work/query.sql --format table
python scripts/mysql_query.py --allow-write --sql-file work/fix.sql
The script reads connection values from TEST_MYSQL_* environment variables by default. It rejects non-read SQL unless --allow-write is passed.