KosmoKrator

other

Mysql CLI for CI

Use the Mysql CLI for CI with headless JSON commands, schema discovery, credentials, and permission controls.

8 functions 5 read 3 write API key auth

Mysql CLI for CI

Run integration calls from CI jobs with JSON output, explicit credentials, and predictable exit status.

Use this shape when a pipeline needs to read or update an external service. The Mysql CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.

Command Shape

# Mysql CLI for CI
kosmokrator integrations:configure mysql --set api_key="$MYSQL_API_KEY" --set host="$MYSQL_HOST" --enable --read allow --write ask --json
kosmo integrations:call mysql.mysql_query '{"sql":"example_sql"}' --json

Discovery Before Execution

Agents and scripts can inspect Mysql docs and schemas before choosing a function.

kosmo integrations:docs mysql --json
kosmo integrations:docs mysql.mysql_query --json
kosmo integrations:schema mysql.mysql_query --json
kosmo integrations:search "Mysql" --json
kosmo integrations:list --json

Useful Mysql CLI Functions

FunctionTypeParametersDescription
mysql.mysql_query Read sql Execute a raw SQL query on the MySQL database. Supports SELECT, INSERT, UPDATE, DELETE, and other SQL statements. Use for custom queries, joins, aggregations, and complex data retrieval.
mysql.mysql_list_databases Read none List all databases accessible to the authenticated MySQL user. Use this to discover which databases are available before querying or exploring tables.
mysql.mysql_list_tables Read database List all tables in a MySQL database. Use this to discover which tables exist before querying or describing their structure.
mysql.mysql_describe_table Read database, table Get the column structure of a MySQL table. Returns column names, types, nullable status, keys, defaults, and extra info. Use this before inserting or updating data to understand the schema.
mysql.mysql_insert Write database, table, data Insert a new row into a MySQL table. Provide column names and values as key-value pairs. Use mysql_describe_table first to understand the schema if needed.
mysql.mysql_update Write database, table, filter, data Update rows in a MySQL table that match a filter. Provide a filter to identify which rows to update and a data object with the new column values. Use mysql_describe_table first to understand the schema if needed.
mysql.mysql_delete Write database, table, filter Delete rows from a MySQL table that match a filter. Provide a filter with column-value pairs to identify which rows to delete. This action is irreversible — use with caution.
mysql.mysql_get_current_user Read none Get information about the currently authenticated MySQL user. Useful for verifying credentials and connection status.

Automation Notes

Related Mysql CLI Pages