MySQL
Updated on October 27, 2026
MySQL
The natural choice for Laravel, WordPress, and the PHP ecosystem at large.
Connection string
DATABASE_URL=mysql://user:password@host:3306/dbname
Laravel
DB_CONNECTION=mysql
DB_HOST=db.<namespace>.svc.cluster.local
DB_PORT=3306
DB_DATABASE=myapp
DB_USERNAME=myapp
DB_PASSWORD=change-me
php artisan migrate --force
WordPress
WORDPRESS_DB_HOST=db.<namespace>.svc.cluster.local
WORDPRESS_DB_NAME=wordpress
WORDPRESS_DB_USER=wordpress
WORDPRESS_DB_PASSWORD=change-me
Node.js client (mysql2)
import mysql from "mysql2/promise";
const pool = mysql.createPool(process.env.DATABASE_URL);
const [rows] = await pool.query("SELECT 1");
The
utf8mb4character set is recommended for any new project: unlikeutf8in MySQL, it correctly handles emojis and the full range of 4-byte Unicode characters.