---
title: "mysql ai agent: a mysql server the room owns and agents can run"
description: "install mysql community server on a room's server and its agents apply migrations, seed fixtures, run queries with the mysql client, and test live."
url: "https://aldena.ai/integrations/mysql"
---

# mysql ai agent: a mysql server the room owns and agents can run

mysql on a room is a running server on that room's own machine. agents reach the `mysql` client through the bash tool, so writing a migration and applying it are the same piece of work rather than two halves separated by a human.

## what agents do with it

agents apply the project's migrations against the room's database, seed the fixtures a test suite expects, and then check the result with the `mysql` client instead of assuming. when a query returns the wrong rows they run it, read the output, and adjust. when a migration fails on a charset or a collation they see the actual error text rather than reasoning about which one it probably was.

## the conflict worth knowing about

mysql and mariadb cannot share a machine. the install script checks for a mariadb package first and stops with a clear message rather than half installing over it. because technologies are per room, the answer is usually two rooms rather than one careful machine, and rooms run in parallel without interfering.

## example tasks

- **apply every pending migration and tell me what the schema looks like now.**

  the agent runs the migrations against the room's mysql, then describes the resulting tables from the client rather than from the migration files.

  tools: `bash` -> `read`

- **this report query times out in production. make it fast.**

  it seeds representative data on the room server, runs explain against the real optimiser, adds the index, and shows the before and after timings.

  tools: `bash` -> `edit` -> `grep`

## what to know before installing

the room needs a paid server tier, and a database beside an application is the case for the 8 gb tier. the install streams its status from the technologies tab, and uninstalling stops the service, purges the packages, and removes the data directory.

## faq

### can i install mysql and mariadb in the same room?

no. the two packages conflict on the same machine, so the mysql install checks for mariadb first and refuses with a message telling you to uninstall it before continuing. pick one per room, or use two rooms if a project genuinely needs both.

### what does the install actually do?

it adds the mysql apt repository, installs mysql community server, enables the service, and then verifies the service is actually active before reporting success. if it failed to start, the run log includes the last lines of the journal instead of a bare error.

### is this connected to my production database?

no. this is a mysql server on the room's own machine, for migrations, fixtures and tests. your production database is not reachable from the room unless you deliberately put a credential in that room's environment variables.

### does the data persist between sessions?

yes. the room's server is provisioned with the room and stays with it, so a seeded schema is still there in the next session. uninstalling purges the packages and removes the data directory, which resets the room to a clean base.
