Hoppa till innehåll

MySQL

Det här innehållet är inte tillgängligt på ditt språk än.

Connect any MySQL-compatible database to Agent Context. This includes standard MySQL, as well as managed services like PlanetScale, TiDB, Amazon RDS for MySQL, and Azure Database for MySQL.

  1. Go to Agent Context in the dashboard
  2. Click Add SourceMySQL
  3. Enter your connection details (or paste a connection string)
  4. Click Test Connection to verify, then Save
ParameterRequiredDefaultDescription
HostYesHostname or IP address of the MySQL server
PortNo3306TCP port number
DatabaseYesName of the database to connect to
UsernameYesUsername for authentication
PasswordYesPassword for the specified user
TableNoTable or view name. Leave empty to discover all tables.

Alternatively, you can paste a connection string:

mysql://user:password@host:3306/database

When the Table field is left empty, Agent Context automatically discovers all accessible tables and views in the database. You can then select which ones to expose to your agents.

When a specific table is provided, only that table is connected.

These MySQL-compatible services work with the MySQL connector:

ServiceWhere to find the connection string
PlanetScaleDashboard → Connect → Connection string
TiDB CloudCluster → Connect → Connection string
Amazon RDSRDS Console → Connectivity & security
Azure Database for MySQLAzure Portal → Connection strings
IssueFix
Connection refusedVerify the host, port, and that the MySQL server is accepting remote connections. Check firewall rules.
Authentication failedVerify username and password. Check that the user has SELECT permission on the target tables.
TimeoutCheck network connectivity. For cloud databases, ensure your IP is allowlisted.