Skip to main content

Adminer

What is Adminer?

Adminer is a single-file database admin GUI that supports MySQL, MariaDB, PostgreSQL, SQLite, and more from one login screen, a lighter alternative to running a dedicated GUI per database engine. There's nothing to "install", Laradock builds it as its own container and you just log in with credentials for whichever database you're already running.

Start Adminer

./laradock start adminer

Adminer itself holds no database data, it's just the GUI. Start whatever database it should connect to alongside it, for example ./laradock start adminer mysql.

Stop Adminer

./laradock stop adminer

To delete the container entirely (nothing important is lost, Adminer has no data of its own beyond the login session, see Persist login sessions below):

./laradock remove adminer

Configuration

All settings live in adminer/defaults.env and can be overridden by adding the same line to your own .env:

VariableDefaultWhat it does
ADM_PORT8081Host-side port for the web UI (container port 8080).
ADM_INSTALL_MSSQLfalseBuild flag, when true, installs pdo_odbc/pdo_dblib so Adminer can connect to SQL Server.
ADM_PLUGINS(empty)Space-separated list of Adminer plugins to enable.
ADM_DESIGNpepa-linhaUI theme.
ADM_DEFAULT_SERVERmysqlServer pre-filled on the login screen, handy for an external server or a non-default container name.

Log in

Open http://localhost:8081. Pick the system (MySQL, PostgreSQL, SQLite, ...), enter the server (container name, e.g. mysql or postgres), and the matching credentials. Adminer is attached to the same Docker network as every other Laradock service, so any running database container is reachable by its service name.

Add SQL Server support

  1. In .env, set ADM_INSTALL_MSSQL=true.
  2. Rebuild:
./laradock rebuild adminer

Load plugins

  1. Set ADM_PLUGINS in .env to the plugin names you want, space-separated.
  2. Some plugins need extra parameters and a custom file inside the container, see Adminer's Loading plugins instructions.
  3. Recreate the container so the new environment value is picked up:
./laradock start adminer

Pre-fill the login screen

Typing the same server name on every login gets old fast. Set ADM_DEFAULT_SERVER in .env to the container name you connect to most (mysql, postgres, mariadb, ...), then recreate the container the same way as Load plugins above. The login form's "Server" field now comes pre-filled, you still choose the system and enter credentials yourself.

Persist login sessions across restarts

Adminer's image declares /sessions as a volume for its "permanent login" feature, but Laradock doesn't mount it to your host by default, so any remembered session is lost when the container is removed or rebuilt. If you rely on staying logged in, add a bind mount to adminer/compose.yml:

services:
adminer:
volumes:
- ${DATA_PATH_HOST}/adminer:/sessions

Then recreate the container:

./laradock start adminer

Common issues

  • SQL Server option missing. ADM_INSTALL_MSSQL is a build-time flag, changing it requires a rebuild (./laradock rebuild adminer), not just a restart.
  • Login rejected. Adminer connects with whatever credentials you type in on the login form, it doesn't read PMA_*-style env vars for the target database. Use the same MYSQL_USER/MYSQL_PASSWORD (or the equivalent for your database) you'd use anywhere else.
  • Can't reach a database by container name. Use the Docker Compose service name (mysql, postgres, mariadb, ...) as the server, not localhost, that only works from your host machine.
  • Stayed logged in, then suddenly logged out. Login sessions live in the container's /sessions folder, which isn't persisted by default, see Persist login sessions above. Removing or rebuilding the container always logs you out unless you've mounted that folder.
  • Port already in use on your host. Change ADM_PORT in .env and restart with ./laradock restart adminer.

Prefer a MySQL-focused GUI instead? See phpMyAdmin. Back to the Getting Started guide.