Query MySQL in plain English

Connect your database, type the question, get the answer. ByeSQL generates the SQL from your real schema, runs it read-only, and gives you a table, a chart or a dashboard panel. Nothing is deployed to your MySQL server.

MySQL 5.7 and 8.0SELECT-only by defaultWorks with RDS, Cloud SQL, PlanetScale

It works from your real schema

The most common failure of a general-purpose model writing SQL is inventing a table or a column. ByeSQL sends your actual schema as context with every prompt, so there is nothing to guess.

Tables and views

Both are introspected, so a question can be answered from a view you already built for reporting.

Columns and types

Names and data types, so DATETIME columns are filtered as dates and numeric columns are aggregated as numbers.

Keys and relationships

Primary keys, foreign keys and unique indexes, so a generated JOIN follows the relationships that actually exist in your schema.

One caveat worth knowing: foreign keys are only visible to introspection on InnoDB tables. If a legacy table still uses MyISAM, ByeSQL sees its columns but not its relationships, and joins involving it may need a follow-up prompt to get right.

The connection we recommend

Never connect a tool with root or your application user. Create a dedicated read-only user scoped to one database.

-- MySQL 8.0
CREATE USER 'byesql_reader'@'%' IDENTIFIED BY 'a-strong-password';

-- Scope it to a single database. MySQL applies this to tables
-- created later too, so there is nothing to re-grant.
GRANT SELECT ON your_database.* TO 'byesql_reader'@'%';

FLUSH PRIVILEGES;

-- Check what it ended up with
SHOW GRANTS FOR 'byesql_reader'@'%';

On MySQL 5.7, use IDENTIFIED WITH mysql_native_password BY '…' instead. If your database sits behind a firewall, replace '%' with the host or range you allow connections from.

What reaches your server, and what does not

Every generated statement passes through a validator before MySQL ever sees it.

Blocked before execution
  • Anything that does not start with SELECT or WITH
  • Any statement containing INSERT, UPDATE, DELETE, DROP, CREATE, ALTER, TRUNCATE, MERGE or REPLACE
  • Multiple statements chained with a semicolon
  • Results above 5,000 rows, and anything still running at 20 seconds
What MySQL actually receives
  • A single SELECT, rewritten to carry a LIMIT
  • Issued by the read-only user you created
  • Taking no locks a normal read would not take
  • Nothing else, ever

Running PostgreSQL too?

Connect both and switch between them in the same workspace. Staging, production and analytics can all live side by side.

ByeSQL for PostgreSQL

MySQL questions

Do I need to change anything on the MySQL server?

Only the user. ByeSQL connects over a standard MySQL connection like any other client: no plugin, no stored procedure, nothing deployed into the server. Create a read-only user, paste the credentials, and revoke the user whenever you want it gone.

Does it work with MySQL 5.7 as well as 8.0?

Yes. The only practical difference is how you create the user: MySQL 5.7 defaults to mysql_native_password, so the CREATE USER statement needs IDENTIFIED WITH mysql_native_password. Managed MySQL on Amazon RDS and Aurora, Google Cloud SQL, Azure Database for MySQL and PlanetScale all work the same way.

Can I limit it to one database on a shared server?

Yes, and this is the recommended setup. A GRANT SELECT ON your_database.* scopes the user to a single database; it cannot see the others on the same server. ByeSQL only introspects what that user can reach.

Do I need to re-grant when I add a table?

No. Unlike PostgreSQL, MySQL applies a database-level grant to tables created after the grant was given, so a new table is readable immediately. You do need to hit Refresh on the connection so ByeSQL re-reads the schema and knows the table exists.

Can it write to my MySQL database?

No. SAFE mode only allows a statement through if it begins with SELECT or WITH, and rejects it if any write keyword appears anywhere in it. That runs before the SQL reaches MySQL. Paired with a SELECT-only user, both the application and the database would have to fail for a write to happen.

See all frequently asked questions →

Ask your MySQL database a question

Free plan, no credit card. Read-only by default, so production is a safe place to start.