Search

Search pages, services, tech stack, and blog posts

MySQL

MySQL DatabaseThe world's most popular open source RDBMS

MySQL powers some of the largest applications on the web — WordPress, Shopify, Airbnb. We deploy and optimise MySQL for projects that need a proven relational database, especially in Laravel and PHP stacks.

MySQL is the world's most popular open-source relational database, powering applications from WordPress to Shopify. With InnoDB's ACID transactions, mature replication, and broad ORM support, MySQL is a reliable choice for web applications, e-commerce, and content platforms. PlanetScale brings MySQL into the modern era with serverless scaling, non-blocking schema changes via Vitess, and Git-like branching for databases. Whether you're running a Laravel app or a TypeScript backend with Prisma, MySQL delivers proven reliability at any scale.

Quick start

bash
# Install MySQL locally
brew install mysql
brew services start mysql

# Create a database
mysql -u root -e "CREATE DATABASE myapp;"

# Or use PlanetScale
pscale database create myapp --region us-east

Read the full documentation at dev.mysql.com/doc/refman/8.0/en/

InnoDB transactions

Full ACID transactions with row-level locking and foreign key constraints via InnoDB.

Query optimisation

EXPLAIN ANALYZE, index hints, and covering indexes — we tune slow queries to run in milliseconds.

Replication & HA

Primary-replica replication, Group Replication, and InnoDB Cluster for high availability.

JSON column support

Native JSON column type with indexable generated columns — semi-structured data alongside relational.

User & privilege system

Fine-grained GRANT system with role-based permissions — least-privilege access by default.

Compatible ORMs

Prisma, Drizzle, TypeORM, Sequelize, and Eloquent all support MySQL with full feature parity.

Why it's hard

Schema migrations on large tables

ALTER TABLE on tables with millions of rows can lock the table for extended periods. PlanetScale's non-blocking DDL or pt-online-schema-change are essential for zero-downtime migrations.

Character encoding and collation

MySQL's default collation (utf8mb4_0900_ai_ci in 8.0) handles most use cases, but emoji, case sensitivity, and locale-specific sorting require deliberate collation choices.

Query optimizer limitations

MySQL's query optimizer can struggle with complex subqueries and derived tables compared to PostgreSQL. Rewriting as JOINs or using generated columns often resolves performance issues.

Best practices

Use InnoDB for all tables

InnoDB provides transactions, row-level locking, and foreign keys. There's rarely a reason to use MyISAM in modern MySQL.

Use PlanetScale for serverless workloads

PlanetScale handles connection pooling, branching, and non-blocking DDL — solving MySQL's biggest operational pain points.

Index strategy: covering indexes

Design indexes that include all columns needed by your query (covering indexes) to avoid table lookups entirely.

Enable slow query log

Set long_query_time to 1s and analyze slow queries with EXPLAIN — the fastest path to performance improvements.

Frequently asked questions



Want to build with MySQL?

Talk to our engineering team about your MySQL architecture. We'll respond within 24 hours.

1 spot available in May 2026Apr 2026 fully booked

We limit intake each month so every project gets the focus it deserves.