localhost/adminer

http://localhost/adminer

Adminer is a full-featured database management tool available in a single PHP file. It's a lightweight, faster alternative to phpMyAdmin that supports MySQL, MariaDB, PostgreSQL, SQLite, MS SQL, Oracle, and MongoDB databases.

→ Open localhost/adminer

Why Use Adminer?

  • Single File - Just one PHP file (~500KB) vs phpMyAdmin's large installation
  • Multiple Databases - MySQL, PostgreSQL, SQLite, MS SQL, Oracle, MongoDB
  • Faster Performance - Lightweight and quick to load
  • Better Security - Smaller attack surface, easier to secure
  • Clean Interface - Simple, intuitive design
  • Foreign Keys - Better support for relationships
  • Export Options - SQL, CSV, TSV export formats
  • Custom Themes - Pluggable design system
  • Easy Updates - Just replace one file

Install Adminer

Quick Installation

  1. Download adminer.php from adminer.org
  2. Create folder: C:\xampp\htdocs\adminer\
  3. Place adminer.php in the folder
  4. Rename to index.php (optional)
  5. Access at http://localhost/adminer

Windows XAMPP Installation

# Download Adminer # Visit: https://www.adminer.org/latest.php # Download: adminer-4.8.1.php (or latest version) # Create adminer directory cd C:\xampp\htdocs mkdir adminer # Move downloaded file to adminer folder # Rename adminer-4.8.1.php to index.php # Access at: http://localhost/adminer

Linux Installation

# Download Adminer cd /var/www/html sudo mkdir adminer cd adminer # Download latest version sudo wget https://www.adminer.org/latest.php -O index.php # Or with curl sudo curl -L https://www.adminer.org/latest.php -o index.php # Set permissions sudo chown www-data:www-data index.php sudo chmod 644 index.php # Access at: http://localhost/adminer

Mac MAMP Installation

# Navigate to htdocs cd /Applications/MAMP/htdocs mkdir adminer cd adminer # Download Adminer curl -L https://www.adminer.org/latest.php -o index.php # Access at: http://localhost:8888/adminer # (Port 8888 is MAMP default)

Connect to Database with Adminer

MySQL/MariaDB Connection

  1. Open http://localhost/adminer
  2. System: MySQL
  3. Server: localhost
  4. Username: root
  5. Password: (blank for XAMPP, or your password)
  6. Database: (leave blank to see all databases)
  7. Click "Login"

Connection Credentials Table

System Database Server Username Password
MySQL (XAMPP) MySQL localhost root (blank)
PostgreSQL PostgreSQL localhost postgres your_password
SQLite SQLite 3 /path/to/database.db - -
MS SQL MS SQL localhost sa your_password

Adminer Features

Database Operations

  • Create, drop, and modify databases
  • Browse tables and data
  • Execute SQL queries
  • Import SQL files
  • Export database to SQL, CSV, TSV
  • Manage users and privileges
  • View database structure
  • Edit table data inline

Table Operations

  • Create, alter, drop tables
  • Manage indexes and foreign keys
  • View and edit table structure
  • Insert, update, delete records
  • Sort and filter data
  • Search across tables

Adminer vs phpMyAdmin

Feature Adminer phpMyAdmin
File Size ~500 KB (1 file) ~12 MB (many files)
Installation Copy one file Extract entire package
Database Support MySQL, PostgreSQL, SQLite, MS SQL, Oracle, MongoDB MySQL, MariaDB only
Performance Fast, lightweight Slower, resource-heavy
User Interface Clean, minimalist Feature-rich, complex
Updates Replace one file Full reinstall
Security Smaller attack surface Larger codebase
Plugins Theme support Extensive plugins

Secure Adminer Installation

# adminer/.htaccess # Allow only from localhost <RequireAll> Require ip 127.0.0.1 Require ip ::1 </RequireAll> # Or password protect AuthType Basic AuthName "Adminer Access" AuthUserFile /path/to/.htpasswd Require valid-user # Security headers <IfModule mod_headers.c> Header set X-Frame-Options "DENY" Header set X-Content-Type-Options "nosniff" Header set X-XSS-Protection "1; mode=block" </IfModule> # Disable directory listing Options -Indexes

Create Password Protection

# Create .htpasswd file # Linux/Mac cd /var/www/html/adminer sudo htpasswd -c .htpasswd admin # Windows (Git Bash or online tool) htpasswd -c .htpasswd admin # Enter password when prompted

Fix "localhost/adminer Not Found"

Common Issues

  • Adminer folder doesn't exist in htdocs
  • No index.php file in adminer folder
  • Apache not running
  • Wrong file permissions
  • File renamed incorrectly

Solutions

# Verify adminer folder exists # Windows dir C:\xampp\htdocs\adminer # Linux ls -la /var/www/html/adminer # Check if index.php exists # Should show adminer PHP file # Verify Apache is running # XAMPP: Check Control Panel # Linux: sudo systemctl status apache2 # Fix permissions (Linux) sudo chown -R www-data:www-data /var/www/html/adminer sudo chmod 755 /var/www/html/adminer sudo chmod 644 /var/www/html/adminer/index.php

Adminer Themes and Customization

Adminer supports custom themes for better appearance:

# Download theme # Visit: https://www.adminer.org/en/ # Popular themes: # - adminer.css (default) # - hydra.css (modern dark theme) # - pepa-linha.css (clean light theme) # Place theme CSS file in same directory as adminer # adminer/ # ├── index.php (adminer) # └── adminer.css (theme) # Adminer automatically loads adminer.css if present

Use Adminer with Docker

# Run Adminer in Docker container docker run -d --name adminer -p 8080:8080 adminer # Access at: http://localhost:8080 # Connect to database in another container docker run -d --name mysql -e MYSQL_ROOT_PASSWORD=password mysql docker run -d --name adminer -p 8080:8080 --link mysql:db adminer # In Adminer login: # System: MySQL # Server: db (container name) # Username: root # Password: password # Docker Compose setup # docker-compose.yml version: '3.8' services: adminer: image: adminer ports: - "8080:8080" environment: ADMINER_DEFAULT_SERVER: db db: image: mysql:8.0 environment: MYSQL_ROOT_PASSWORD: password MYSQL_DATABASE: myapp # Start: docker-compose up -d # Access: http://localhost:8080

Adminer Plugins

Extend Adminer functionality with plugins:

# Download Adminer with plugins # Visit: https://www.adminer.org/en/plugins/ # Popular plugins: # - Login servers: Predefined server list # - Edit calendar: Date/time picker # - Dump JSON: Export to JSON # - Tables filter: Quick table search # - Adminer theme: Better styling # Using plugins # Download adminer-plugin.php # Create plugins folder # Add plugins to folder # Configure in adminer-plugin.php
Security Warning: Never leave Adminer accessible on production servers without authentication. Always protect with .htaccess, firewall rules, or remove after use. Consider IP whitelisting or VPN access only.

Adminer Command-Line Access

While Adminer is web-based, you can automate tasks:

# Export database using curl curl "http://localhost/adminer/?username=root&db=mydb&dump=1" > backup.sql # With authentication curl -u admin:password "http://localhost/adminer/?username=root&db=mydb&dump=1" > backup.sql # Automate backups # backup.sh #!/bin/bash DATE=$(date +%Y%m%d) curl "http://localhost/adminer/?username=root&db=mydb&dump=1" > backup_$DATE.sql
Performance Tip: Adminer loads much faster than phpMyAdmin, especially useful when managing multiple databases or working with slow connections. The single-file design also makes it portable and easy to backup.

Frequently Asked Questions

Is Adminer better than phpMyAdmin?

Adminer is lighter and faster but phpMyAdmin has more features. For most users, Adminer's simplicity and performance make it better for daily use. phpMyAdmin is better for complex operations.

Can Adminer manage PostgreSQL?

Yes, Adminer supports MySQL, PostgreSQL, SQLite, MS SQL, Oracle, Elasticsearch, MongoDB, and more. Just select the database system on the login page.

How do I update Adminer?

Simply download the latest adminer.php file and replace the old one. That's it - no configuration migration needed.

Why can't I access localhost/adminer?

Check: adminer folder exists in htdocs, contains index.php file, Apache is running, and file permissions are correct. Also verify URL spelling.

Is Adminer safe to use?

Yes, but always protect it with authentication. Don't leave it publicly accessible. The smaller codebase actually makes it more secure than larger tools with more potential vulnerabilities.

Related URLs and Resources