Skip to content

Manage MySQL databases with Adminer

Adminer is a single-file PHP script for managing, exporting, and importing MySQL databases through your browser.

Adminer is often preferred over phpMyAdmin due to the simplicity of installing Adminer.

A single installation of Adminer can be used to access multiple databases on the same server. You’ll log into Adminer using a database user’s credentials and Adminer will authenticate to MySQL using those same credentials.

Install Adminer

  1. SSH into your server as the system user of the app on which you’ll install Adminer.
  2. Change directory to the app’s web root directory.
    Terminal window
    cd ~/apps/APPNAME/public
  3. Download Adminer.
    Terminal window
    wget https://github.com/vrana/adminer/releases/download/v5.0.5/adminer-5.0.5-mysql.php
  4. Rename the downloaded adminer-5.0.5-mysql.php file to adminer.php or any other name you prefer. Do not change the .php file extension.
    Terminal window
    mv adminer-5.0.5-mysql.php adminer.php

After installing Adminer, access Adminer in your browser using your app’s domain name and the name of the Adminer file. For example, use https://DOMAIN/adminer.php if you named the file adminer.php.

Log into Adminer

  1. Open your app’s Adminer script in your browser.
  2. For Username, enter the name of the database user for the database you want to manage.
  3. For Password, enter the database user’s password.
  4. For Database, enter the name of the database.
  5. Click Login.

Export a database

  1. Log into Adminer.
  2. Click on Export.
  3. Change the Output selection from Open to one of the following:
    • Select Save to download an uncompressed .sql file.
    • Select Gzip to download a compressed .sql.gz file.
  4. Click Export.
  5. Choose the location on your local computer to save the database export file.

Import a database

  1. Log into Adminer.
  2. Click on Import.
  3. Click on Choose files.
  4. Select the .sql or .sql.gz file on your local computer.
  5. Click Execute.