CONNECT APP
Build with MySQL
MySQL is an open-source relational database management system.
Databases
- API key
MCP
Give your agent MySQL tools
Every MySQL action is exposed as an MCP tool on Pipedream's remote server. Point a client at it with your end user's ID and Connect resolves that user's MySQL account for each tool call — you store no tokens.
// accessToken: mint a short-lived token with the Connect SDK — see the MCP guide
const transport = new StreamableHTTPClientTransport(
new URL("https://remote.mcp.pipedream.net/v3"),
{
requestInit: {
headers: {
Authorization: `Bearer ${accessToken}`,
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
"x-pd-app-slug": "mysql",
},
},
},
)
const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)
const { tools } = await mcp.listTools()
// e.g. run Execute SQL Query:
const result = await mcp.callTool({
name: "mysql-execute-raw-query",
arguments: {
sql: "SQL Query",
},
})# access_token: mint a short-lived token with the Connect SDK — see the MCP guide
headers = {
"Authorization": f"Bearer {access_token}",
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", # any stable ID for this user in your system
"x-pd-app-slug": "mysql",
}
async with streamablehttp_client("https://remote.mcp.pipedream.net/v3", headers=headers) as (read, write, _):
async with ClientSession(read, write) as session:
await session.initialize()
tools = await session.list_tools()
# e.g. run Execute SQL Query:
result = await session.call_tool("mysql-execute-raw-query", {
"sql": "SQL Query",
})SDK
Run MySQL actions from your backend
Connect a user's MySQL account once, then run Execute SQL Query on their behalf from your own code — TypeScript, Python, or plain HTTP.
import { PipedreamClient } from "@pipedream/sdk"
const pd = new PipedreamClient({
projectId: process.env.PIPEDREAM_PROJECT_ID!,
clientId: process.env.PIPEDREAM_CLIENT_ID!,
clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
projectEnvironment: "production",
})
const result = await pd.actions.run({
id: "mysql-execute-raw-query",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
mysql: { authProvisionId: "apn_xxxxxxx" },
sql: "SQL Query",
},
})from pipedream import Pipedream
pd = Pipedream(
client_id="{oauth_client_id}",
client_secret="{oauth_client_secret}",
project_id="{project_id}",
project_environment="production",
)
result = pd.actions.run(
id="mysql-execute-raw-query",
external_user_id="{external_user_id}", # any stable ID for this user in your system
configured_props={
"mysql": {"authProvisionId": "apn_xxxxxxx"},
"sql": "SQL Query",
},
)curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
-H "Content-Type: application/json" \
-H "X-PD-Environment: production" \
-H "Authorization: Bearer {access_token}" \
-d '{
"external_user_id": "{external_user_id}",
"id": "mysql-execute-raw-query",
"configured_props": {
"mysql": { "authProvisionId": "apn_xxxxxxx" },
"sql": "SQL Query"
}
}'TOOLS
MySQL actions
On-demand operations your product or agent can configure and run on behalf of a connected user.
-
Execute SQL Query
actionExecute a custom MySQL query. See our docs to learn more about working with SQL in Pipedream.Writev2.0.3 -
Create Row
actionAdds a new row. See the docs hereWritev2.0.7 -
Delete Row
actionDelete an existing row. See the docs hereWritev2.0.7 -
Execute Query
actionFind row(s) via a custom query. See the docs hereRead-onlyv2.0.7 -
Execute Stored Procedure
actionExecute Stored Procedure. See the docs hereWritev2.0.7 -
Find Row
actionFinds a row in a table via a lookup column. See the docs hereRead-onlyv2.0.7 -
List Stored Procedure Options
actionRetrieves available options for the Stored Procedure field.Read-onlyv0.0.1 -
List Table Options
actionRetrieves available options for the Table field.Read-onlyv0.0.1 -
Query SQL Database
actionExecute a SQL Query. See our docs to learn more about working with SQL in Pipedream.Writev0.0.5 -
Update Row
actionUpdates an existing row. See the docs hereWritev2.0.7
-
New Column
triggerEmit new event when you add a new column to a table. See the docs herev2.0.6 -
New or Updated Row
triggerEmit new event when you add or modify a new row in a table. See the docs herev2.0.6 -
New Row
triggerEmit new event when you add a new row to a table. See the docs herev2.0.6 -
New Row (Custom Query)
triggerEmit new event when new rows are returned from a custom query. See the docs herev2.0.6 -
New Table
triggerEmit new event when a new table is added to a database. See the docs herev2.0.6
MULTI-APP
Use MySQL with other popular apps
Most products don't stop at one integration. Pair MySQL with the other apps your users rely on, and ship use cases that span both.
- App slug
- mysql
- Authentication
- API key
- Categories
- Databases
- Actions
- 10
- Triggers
- 5
- API proxy
- Not available