Database

Mariadb Playground

MariaDB is a fast, open-source relational database system, fully compatible with MySQL and designed for high performance..

Get access to the Mariadb playground with one click

Welcome to the MariaDB Playground!

MariaDB 11 — the community-driven MySQL fork with performance improvements, new storage engines, and full MySQL compatibility. mariadbd starts automatically.

What’s Pre-installed

  • MariaDB 11 server + mysql client
  • Auto-provisioned database: codeground
  • Credentials: user codeground, password codeground

Quick Start

mysql -u codeground -pcodeground codeground
SHOW TABLES;
SELECT VERSION();

Common Workflows

-- Create table
CREATE TABLE notes (
  id INT AUTO_INCREMENT PRIMARY KEY,
  title VARCHAR(200),
  body TEXT,
  created_at DATETIME DEFAULT CURRENT_TIMESTAMP
);

-- Insert & query
INSERT INTO notes (title, body) VALUES ('First note', 'Hello MariaDB!');
SELECT * FROM notes;
DESCRIBE notes;

-- EXPLAIN for query analysis
EXPLAIN SELECT * FROM notes WHERE title = 'First note';

Advanced Tips

-- MariaDB Sequences (unlike MySQL AUTO_INCREMENT)
CREATE SEQUENCE myseq START WITH 100 INCREMENT BY 5;
SELECT NEXT VALUE FOR myseq;

-- Dynamic columns (schema-free)
CREATE TABLE items (id INT, attrs BLOB);
INSERT INTO items VALUES (1, COLUMN_CREATE('color', 'red', 'size', 'L'));
SELECT COLUMN_GET(attrs, 'color' AS CHAR) FROM items;

-- System versioned tables
CREATE TABLE prices (id INT, price DECIMAL) WITH SYSTEM VERSIONING;
SELECT * FROM prices FOR SYSTEM_TIME AS OF NOW() - INTERVAL 10 MINUTE;

Session Notes

  • Session lasts 1 hour.
  • Fully compatible with MySQL syntax — any MySQL tutorial applies here.