---
title: Deploying phpMyAdmin with Docker to manage MySQL Databases
description: This page shows you how to deploy a phpMyAdmin instance in a few steps using the Docker InstantApp.
products:
  - instances
  - postgresql-and-mysql
tags: phpMyAdmin Docker InstantApp MySQL
dates:
  validation: 2025-03-06
  posted: 2018-06-04
  validation_frequency: 12
difficulty: beginner
usecase:
  - deploy-external-software
ecosystem:
  - third-party
---
import image from './assets/scaleway_database_information.webp'
import image2 from './assets/scaleway_phpmyadmin_login.webp'
import image3 from './assets/scaleway_phpmyadmin_dashboard.webp'

import Requirements from '@macros/iam/requirements.mdx'


Managing a database can be a complex and laborious part when running a web application.
Software like phpMyAdmin exist to make the process much lighter. It is a popular administration tool that allows you to access and manage your databases much more easily.

In this tutorial, you learn how to deploy the tool on an [Instance](https://www.scaleway.com/en/virtual-instances/) using the [Docker](https://www.docker.com/) InstantApp.

<Requirements />

- A Scaleway account logged into the [console](https://console.scaleway.com)
- [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization
- An [SSH key](/organizations-and-projects/how-to/create-ssh-key/)
- A MySQL database

## Creating a Docker Instance

1. Click **CPU & GPU Instances** in the **Compute** section of the side menu. The [Instances page](https://console.scaleway.com/instance/servers) displays.
2. Click **Create Instance**. The [Instance creation wizard](https://console.scaleway.com/instance/servers/create) displays.
3. Configure your Instance:
    * Choose the Availability Zone.
    * Select the Instance type (in this tutorial we use a [PLAY2-NANO Instance](https://console.scaleway.com/instance/servers/create?imageKey=c1b530d8-0ca0-45c4-80db-ba06608287b2&offerName=PLAY2-NANO&zone=fr-par-2)).
    * Select the Image for the Instance: Click the **InstantApps** tab and select the **Docker** image.
    * If required, configure storage options.
    * Enter a name for the Instance and optionally tags for it.
4. Click **Create Instance** to launch its creation. Once the Instance is ready, you are redirected to its information page.

## Deploying phpMyAdmin

1. Connect to your Instance using [SSH](/instances/how-to/connect-to-instance/):
    ```bash
    ssh root@<your_instance_ip>
    ```
2. Download the [official Docker image](https://hub.docker.com/_/phpmyadmin) by running the following command:
    ```bash
    docker pull phpmyadmin
    ```
3. Run the container with the following command:
    ```bash
    docker run --name phpmyadmin -d -e PMA_HOST=$DB_HOST -e PMA_PORT=$DB_PORT -p 8080:80 phpmyadmin
    ```

    * Replace `$DB_HOST` with the hostname or IP of your MySQL server.
    * Replace `$DB_PORT` with the port your MySQL server is listening on.

    <Message type="tip">
      If you are using a [Database for MySQL](/managed-databases-for-postgresql-and-mysql/quickstart/) you can find the connection details on the Database information page:

      <Lightbox image={image} alt="" />
    </Message>
4. Open a web browser tab and go to `http://<your_instance_ip>:8080`. The phpMyAdmin login displays:
    <Lightbox image={image2} alt="" />
5. Enter your MySQL credentials and click **Go**. The phpMyAdmin Dashboard displays:
    <Lightbox image={image3} alt="" />

You can now manage your MySQL databases using the graphical interface of phpMyAdmin.

<Message type="note">
  For security reasons, you should stop the Docker container after you complete your database maintenance.
  To stop the container run the following command:
  ```
  docker stop phpmyadmin
  ```

  To restart the container, repeat the steps above.
</Message>