other
Mysql CLI for Headless Automation
Use the Mysql CLI for headless automation with headless JSON commands, schema discovery, credentials, and permission controls.
8 functions 5 read 3 write API key auth
Mysql CLI for Headless Automation
Use KosmoKrator as a non-interactive integration runtime for local automations and wrappers.
Use headless automation when another tool needs a stable local command surface. 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 Headless Automation
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
| Function | Type | Parameters | Description |
|---|---|---|---|
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
- Use
--jsonfor machine-readable output. - Keep credentials out of argv by using environment variables or stored KosmoKrator configuration.
- Configure read/write policy before unattended runs; use
--forceonly for trusted automation. - Use the MCP gateway instead when the agent needs dynamic tool discovery inside a conversation.