Skip to main content
MySQL 8.0 is available as an on-demand service for your pods.

Install

instapod services add my-app --service mysql --wait
Installation takes approximately 8–15 seconds.

Credentials

instapod services creds my-app --service mysql
FieldValue
Hostlocalhost
Port3306
Usernameinstapod
Password(auto-generated)
Databaseinstapod

Connecting from Your Application

PHP

$pdo = new PDO(
    'mysql:host=localhost;port=3306;dbname=instapod',
    'instapod',
    'YOUR_PASSWORD'
);

Node.js

const mysql = require('mysql2/promise');

const connection = await mysql.createConnection({
  host: 'localhost',
  port: 3306,
  user: 'instapod',
  password: 'YOUR_PASSWORD',
  database: 'instapod'
});

Python

import mysql.connector

conn = mysql.connector.connect(
    host='localhost',
    port=3306,
    user='instapod',
    password='YOUR_PASSWORD',
    database='instapod'
)

Command Line Access

SSH into your pod and use the mysql client:
instapod ssh my-app
mysql -u instapod -p instapod

Configuration

MySQL runs with secure defaults suitable for development:
  • Listens on localhost:3306 only (not accessible from outside the pod)
  • Default charset: utf8mb4
  • InnoDB storage engine