start here

start using MySQL with your agents

sign up, open a project, and add MySQL to its setup script in settings → server.

Start 7-day trial with MySQL
integrationstechnologyupdated
schematic diagram of the work aldena agents do through MySQL
MySQL

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

add mysql community server to a project's setup script and its agents apply migrations, seed fixtures, run queries with the mysql client, and test live.

runs on
conversation sandbox
installed by
setup script
category
datastore

mysql on a project is a running server in each conversation's own sandbox. 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 app's migrations against the project'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. a setup script that installs both leaves a broken system behind. because each project has its own setup script, the answer is usually two projects rather than one careful machine, and projects run in parallel without interfering.

example tasks

  • 01

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

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

    bashread
  • 02

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

    it seeds representative data in the conversation's sandbox, runs explain against the real optimiser, adds the index, and shows the before and after timings.

    basheditgrep

what to know before installing

the project needs a sandbox, and a database beside an application is the case for the standard size or larger. settings → server shows the setup script's last run. a new conversation gets its own sandbox, and the setup script runs on it again.

how to install MySQL

MySQL goes in the project's setup script, not once per team and not on your laptop.

  1. give the project a sandbox

    MySQL runs in each conversation's sandbox, on your team's own sandbox provider account. an owner or admin connects a provider once on the team's providers page, then picks it and a default size for the project, at creation or later in settings → server. a project with no sandbox has nowhere to run it.

  2. add it to the setup script

    settings → server holds the project's setup script, a bash script that runs once on each new sandbox, in /project, with sudo. add MySQL's install commands there and save.

  3. the next sandbox runs it

    the script runs when a conversation's sandbox is created or reused, on the conversation's first turn. settings shows the last run with its exit code and output, and a failed run leaves the sandbox usable rather than blocking the project.

  4. agents use it through bash

    from then on every agent in the project reaches MySQL with the bash tool, on the same filesystem as the checkout they are working in. the conversation's sandbox keeps it between turns, sleeping when idle and waking with the next one.

where MySQL actually lives

each conversation in a project gets its own sandbox on your team's sandbox provider account, and the project's setup script in settings → server decides what is on it. two projects never share a filesystem, so a version pinned for one client cannot collide with another's.

the sandbox provider bills its machine time to your team's account while it runs, and aldena adds nothing. the sizes are on isolated projects, and what agents may run in the sandbox is governed by the project's tool permissions.

faq

can i install mysql and mariadb in the same project?

no. the two packages conflict on the same machine, so a setup script should install one or the other, never both. pick one per project, or use two projects if the work genuinely needs both.

what should the setup script do for mysql?

add the mysql apt repository, install mysql community server, enable the service, and check that it is actually active at the end. settings → server shows the tail of the last run's output, so a failed start reads as a real error instead of a bare exit code.

is this connected to my production database?

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

does the data persist between sessions?

only within a conversation. each conversation's sandbox keeps its files between turns, sleeping when idle and waking with the next one, so a seeded schema is still there next time. a new conversation gets its own sandbox, and the setup script runs on it again. a conversation left quiet for 7 days gives its sandbox back, and its next turn starts fresh.

ready when you are

spin up your first project.

one project per client, product, or piece of work, staffed with intake, requirements, build and code review agents.