OneCompiler
MySQL

MySQL

Database

A running MySQL database, ready in about ten seconds. Pick a sample dataset when you launch and the workspace boots with the tables already created and filled, so you can connect from VS Code and start writing SQL right away.

What's included

Preloaded sample data

Choose a dataset at launch and the database comes up with the tables created and rows inserted. Options include Employees, USA Zip Codes, Times Person of the Year and Cats in movies.

Real VS Code

The full cloud editor with an integrated terminal, so you can connect to the database and run queries without leaving the browser.

Quick start

The instance launches in about ten seconds with the sample data already loaded, so there's nothing to install or import.

Practice and prototype

Write joins, aggregations, stored procedures and functions against realistic data, or start from an empty database and build your own schema.

Tech stack

MySQLSQLVS Code

What is MySQL?

MySQL is one of the most widely used open-source relational databases. It stores data in tables with rows and columns, and you query and change that data with SQL. It's a common choice for web apps, analytics and anything that needs reliable structured storage.

This workspace gives you a real MySQL server that's already running. Instead of installing a database locally and importing data by hand, you pick a sample dataset at launch and the workspace boots with everything in place, so you can get straight to writing queries.

What's inside this workspace

You get a live MySQL instance and a cloud VS Code editor with a terminal. When you launch, you choose one of the sample datasets and the database comes up with those tables created and populated.

The Employees dataset is a small HR schema with departments, employees, leaves and salaries, plus a couple of stored routines you can call. USA Zip Codes is a single table of US cities with population and coordinates. Times Person of the Year lists each year's honoree with country and category. Cats in movies catalogs films featuring cats. Prefer a clean slate? Pick None and you get an empty database to build in.

How to use it

Open the terminal in VS Code and connect to the MySQL instance, then run your SQL. Try a few SELECTs against the sample tables, join across them, group and count, or create your own tables and insert data. The instance is sized for learning and prototyping at 50MB across up to 20 tables, so it suits experiments rather than production loads.

What you can do with it

Practice SQL against data that looks like the real thing, prototype a schema for a side project, test a query before you run it somewhere serious, or work through a tutorial without setting up a database first.

Frequently asked questions

Which sample datasets are included?

You can launch with Employees, USA Zip Codes, Times Person of the Year, or Cats in movies. Each one comes with the tables created and the rows already loaded.

Can I start with an empty database?

Yes. Pick None at launch and you get an empty MySQL database with no sample tables, ready for you to create your own schema.

How do I connect and run queries?

Open the integrated terminal in VS Code and connect to the running MySQL instance, then type your SQL. Everything happens inside the browser workspace.

How big can the database get?

The instance is meant for practice and prototyping, with around 50MB of storage and up to 20 tables. It's great for sample data and experiments, not for production workloads.

How long does it take to start?

About ten seconds. The sample data is loaded as part of launch, so the database is ready to query as soon as the workspace opens.

Is it free?

No, MySQL is a paid template and needs a paid plan. Templates that are free are marked as such. You can upgrade from the pricing page to launch it.

Related templates

MySQL online Studio — cloud MySQL playground | OneCompiler