- The panel is not MySQL. It runs SQLite in your browser; SELECT, JOIN, GROUP BY, subqueries, CTEs and window functions written in standard SQL behave the same.
- MySQL-only statements such as
SHOW TABLES,DESCRIBE, stored procedures andDATE_FORMATfail here. - The free way to get real MySQL is MySQL Community Server, either installed from dev.mysql.com or run from the Docker Official Image
mysql. - The MySQL download page currently offers 8.4.11 LTS, 9.7.2 LTS and 26.7.0.
What this MySQL online compiler page actually runs
MySQL is a server program; no build of it runs inside a web browser. Rather than send your SQL to a server, the editor above runs SQLite, compiled to WebAssembly by the sql.js project, on your device. It is useful for practising the SQL that MySQL shares with other databases, and it says so above the editor.
- Press Run or Ctrl+Enter (Cmd+Enter on a Mac). Results show up to 1,000 rows; Download CSV saves the last one.
- Sample data switches between a shop database (customers, products, orders, order_items) and an HR database (departments, employees); Reset data restores it.
- Copy share link puts the query in the URL after
#q=. Nothing is stored on a server, and the link fills the editor without running it.
Both queries below use the shop data and run unchanged here and on MySQL.
SELECT c.country, COUNT(*) AS orders, SUM(o.total) AS revenue
FROM orders o
JOIN customers c ON c.customer_id = o.customer_id
WHERE o.status <> 'returned'
GROUP BY c.country
HAVING COUNT(*) > 1
ORDER BY revenue DESC;SELECT name, price
FROM products
WHERE price > (SELECT AVG(price) FROM products)
ORDER BY price DESC;MySQL vs this SQLite editor: syntax that differs
The most common surprises when moving between the two, from each project's documentation:
| Task | MySQL | SQLite (this editor) |
|---|---|---|
| Limit rows | LIMIT 3 | LIMIT 3 (the same) |
| Join strings | CONCAT(a, b); || means OR unless the PIPES_AS_CONCAT SQL mode is set | a || b |
| List tables | SHOW TABLES | SELECT name FROM sqlite_schema WHERE type = 'table' |
| Column types | Static: the column's type decides what it stores | Dynamic: the type belongs to each value |
Free ways to run real MySQL
MySQL Community Server. The free edition is downloaded from dev.mysql.com for Windows, macOS and several Linux distributions. The download page lists 8.4.11 LTS and 9.7.2 LTS, which are long-term support releases, alongside 26.7.0, the newest release. Learners usually pick an LTS release.
Docker. The Docker Official Image mysql starts a server with one command and a root password set through MYSQL_ROOT_PASSWORD. Pin a version tag rather than latest, which currently points to 26.7. The MySQL Reference Manual also documents running MySQL in Docker.
Online. Several cloud providers offer a free tier or trial for managed MySQL. Our free database hosting and MySQL hosting pages compare the current options and limits.
Once MySQL is running, a GUI helps: see our MySQL Workbench review and best MySQL GUI tools. Deciding between engines? Read MySQL vs PostgreSQL; for real Postgres in the browser, use the PostgreSQL playground.
Privacy
The editor runs entirely in your browser. Your queries and results are not sent to CodeWithSQL or to anyone else, and everything resets when you reload. A share link contains the query text, so anyone with the link can read it.
Practise with the SQL exercises or learn from the start with the SQL beginner course.
Frequently asked questions
Can I run MySQL online for free?
Not in a browser: MySQL needs a server. You can practise standard SQL in the editor above, install MySQL Community Server or run the mysql Docker image at no cost, or use a cloud free tier.
Why does SHOW TABLES fail here?
Because the editor runs SQLite. Use SELECT name FROM sqlite_schema WHERE type = 'table';, or open Sample data: tables and columns under the editor.
Which MySQL version should I install?
An LTS release (8.4 or 9.7) gets the longest support. The download page also offers 26.7.0, the newest release.
Is MySQL free?
MySQL Community Server, the edition on the MySQL Community Downloads page, is open source and costs nothing to download and use. It is the edition the options on this page refer to.
Sources
- MySQL Community Server downloads
- Docker Official Image: mysql
- MySQL 8.4 Reference Manual: Deploying MySQL with Docker
- MySQL 8.4 Reference Manual: SELECT
- MySQL 8.4 Reference Manual: String functions
- MySQL 8.4 Reference Manual: Server SQL modes
- MySQL 8.4 Reference Manual: SHOW TABLES
- sql.js on GitHub
- SQLite: Datatypes in SQLite
- SQLite: SQL language expressions
Checked 8 October 2026.
How we research tool pages: our editorial method. The engines are open-source projects credited on each page.