Damp

MySQL Database

Popular relational database server

Relational database server for local development using the latest MySQL version.

Docker Configuration

Image: mysql:latest
Ports: 3306:3306
Volume: damp_mysql_data:/var/lib/mysql

DAMP identifies the service using Docker labels. Container name is auto-generated by Docker.

Port Configuration

Default ports: 3306 (host) → 3306 (container)

If port 3306 is occupied on the host machine, DAMP automatically uses the next available port. Check the DAMP interface to see the actual port assigned.

Environment Variables

VariableValueDescription
MYSQL_ROOT_PASSWORDrootpasswordRoot account password
MYSQL_DATABASEdevelopmentDefault database
MYSQL_USERdeveloperNon-root user
MYSQL_PASSWORDdevpasswordUser password

Connection Information

From Host Machine (Windows)

Connect from your Windows host to the MySQL service.

mysql -h localhost -P 3306 -u developer -pdevpassword development

Connection Details:

  • Host: localhost
  • Port: 3306 (or actual port shown in DAMP)
  • User: developer
  • Password: devpassword
  • Database: development

Connection String:

mysql://developer:devpassword@localhost:3306/development

From Project Containers

Connect from your DevContainers or other Docker containers to the MySQL service.

Use the container name or ID shown in the DAMP interface.

# Using container name from DAMP
mysql -h [container-name] -u developer -pdevpassword development

Laravel .env Configuration:

DB_CONNECTION=mysql
DB_HOST=[container-name]
DB_PORT=3306
DB_DATABASE=development
DB_USERNAME=developer
DB_PASSWORD=devpassword

Replace [container-name] with the actual container name displayed in DAMP.

Common Operations

Create New Database

mysql -h localhost -u root -prootpassword

CREATE DATABASE my_new_db;
GRANT ALL ON my_new_db.* TO 'developer'@'%';
FLUSH PRIVILEGES;

Import SQL File

# From host
mysql -h localhost -u developer -pdevpassword development < backup.sql

# From project container (use container name from DAMP)
mysql -h [container-name] -u developer -pdevpassword development < backup.sql

Backup Database

mysqldump -h localhost -u developer -pdevpassword development > backup.sql

Data Persistence

All data is stored in the damp_mysql_data Docker volume. Removing the service preserves your databases.

On this page