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
- SSH into your server as the system user of the app on which you’ll install Adminer.
- Change directory to the app’s web root directory.
Terminal window cd ~/apps/APPNAME/public - Download Adminer.
Terminal window wget https://github.com/vrana/adminer/releases/download/v5.0.5/adminer-5.0.5-mysql.php - Rename the downloaded
adminer-5.0.5-mysql.php
file toadminer.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
- Download Adminer: https://github.com/vrana/adminer/releases/download/v5.0.5/adminer-5.0.5-mysql.php
- Rename the downloaded
adminer-5.0.5-mysql.php
file toadminer.php
or any other name you prefer. Do not change the.php
file extension. - SFTP into your server as the system user of the app on which you’ll install Adminer.
- Upload the
adminer.php
file to your app’s web root directory (apps/APPNAME/public/
).
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
- Open your app’s Adminer script in your browser.
- For Username, enter the name of the database user for the database you want to manage.
- For Password, enter the database user’s password.
- For Database, enter the name of the database.
- Click Login.
Export a database
- Log into Adminer.
- Click on Export.
- 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.
- Select Save to download an uncompressed
- Click Export.
- Choose the location on your local computer to save the database export file.
Import a database
- Log into Adminer.
- Click on Import.
- Click on Choose files.
- Select the
.sql
or.sql.gz
file on your local computer. - Click Execute.