# MySQL

Source : https://webgune.cloud/en-us/docs/db-mysql · Mis à jour le 2026-10-27

# MySQL

The natural choice for Laravel, WordPress, and the PHP ecosystem at large.

## Connection string

```bash
DATABASE_URL=mysql://user:password@host:3306/dbname
```

## Laravel

```bash
DB_CONNECTION=mysql
DB_HOST=db.<namespace>.svc.cluster.local
DB_PORT=3306
DB_DATABASE=myapp
DB_USERNAME=myapp
DB_PASSWORD=change-me
```

```bash
php artisan migrate --force
```

## WordPress

```bash
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)

```javascript
import mysql from "mysql2/promise";

const pool = mysql.createPool(process.env.DATABASE_URL);
const [rows] = await pool.query("SELECT 1");
```

> The `utf8mb4` character set is recommended for any new project: unlike `utf8` in MySQL, it correctly handles emojis and the full range of 4-byte Unicode characters.
