engineertechlabs / dbadmin
Unified phpMyAdmin-inspired database administration platform for PostgreSQL and MariaDB/MySQL
Requires
- php: ^8.3
- ext-json: *
- ext-mbstring: *
- ext-openssl: *
- ext-pdo: *
- ext-pdo_mysql: *
- ext-pdo_pgsql: *
- ext-session: *
- ext-zlib: *
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
A unified, phpMyAdmin-inspired database administration platform supporting MariaDB / MySQL and PostgreSQL through a single interface.
Features
- Dual-Engine Support: Manage MariaDB / MySQL and PostgreSQL servers side-by-side using a unified driver architecture (
DatabaseDriverInterface). - Database & Table Management: Structure inspection, browse/search/insert/edit/delete, indexes, foreign keys, views, routines, events, triggers, tracking, central columns, and table/database operations.
- Advanced SQL Workspace: CodeMirror SQL editor with syntax highlighting, autocomplete hints, query history, saved queries, and multi-statement result sets.
- Visual Database Designer: Interactive ER diagram with foreign-key line/dot anchoring, zoom/pan, SVG export, and layout persistence.
- Import & Export: SQL, CSV, JSON, and XML export/import with XXE protection and native
mysqldump/pg_dump/psqlintegration. - Users, Roles & Privileges: Multi-scope MariaDB privilege resolution (global, database, table, column, routine) and PostgreSQL role/ownership/ACL inspection.
- Server Monitoring & Diagnostics: Read-only performance overview, active connections/processes, query stats, storage analysis, index diagnostics, and lock/transaction monitoring.
- Dynamic Server Registry: Preconfigured local servers plus UI-managed custom connection profiles (
/connections) with optional AES-256-GCM encrypted credentials.
Requirements
- PHP 8.3+
- Required PHP extensions:
json,mbstring,openssl,pdo,pdo_mysql,pdo_pgsql,session,zlib - Web server: Works with XAMPP / Apache / Nginx, or standalone without XAMPP using PHP's built-in server (
php bin/dbadmin serve).
Cross-Platform Installation
Unified DB Admin includes an OS-aware installer (bin/dbadmin, install.sh, install.ps1) that automatically detects your OS and installs into the appropriate location:
| OS | If XAMPP / Webroot Exists | If No XAMPP / Web Server Exists (Standalone) |
|---|---|---|
| Linux | /opt/lampp/htdocs/dbadmin or /var/www/html/dbadmin |
~/.local/share/dbadmin |
| macOS | /Applications/XAMPP/xamppfiles/htdocs/dbadmin or /opt/homebrew/var/www/dbadmin |
~/Library/Application Support/dbadmin |
| Windows | C:\xampp\htdocs\dbadmin or C:\laragon\www\dbadmin |
%LOCALAPPDATA%\dbadmin |
Linux & macOS
chmod +x install.sh bin/dbadmin ./install.sh
Custom path:
./install.sh --dir=/path/to/install
Windows (PowerShell)
.\install.ps1
Custom path:
.\install.ps1 -Dir "D:\apps\dbadmin"
Composer
composer create-project engineertechlabs/dbadmin
cd dbadmin
composer install-app
Running Without XAMPP (Standalone Mode)
XAMPP is optional. On any machine with PHP 8.3+, start the built-in standalone server:
php bin/dbadmin serve
# or via Composer:
composer serve
Then open http://127.0.0.1:8080/ in your browser. (config/app.php automatically adjusts base_url between / in standalone mode and /dbadmin under Apache/XAMPP.)
To check PHP extensions and detected install path before installing:
php bin/dbadmin check
Preconfigured Local Servers
Defined in config/connections.php (passwords are never stored in config):
| ID | Name | Driver | Host | Port | Default DB |
|---|---|---|---|---|---|
xampp-mariadb |
XAMPP MariaDB | mariadb |
127.0.0.1 |
3306 |
"" |
system-mariadb |
System MariaDB | mariadb |
127.0.0.1 |
3307 |
"" |
postgres-main |
PostgreSQL Main | pgsql |
127.0.0.1 |
5432 |
postgres |
postgres-bb-studio |
BB-Studio PostgreSQL | pgsql |
127.0.0.1 |
47820 |
bb_studio |
Additional servers can be registered anytime through the Connections page (/connections).
Security
- Localhost-only guard by default (
127.0.0.1,::1). - No hardcoded credentials: Database credentials are entered at login and kept in the PHP session, or encrypted at rest with AES-256-GCM when explicitly opted in.
- CSRF protection on all state-changing requests, prepared statements for data queries, and strict identifier validation.
- See
SECURITY.mdfor reporting vulnerabilities.
Testing
for t in tests/*.php; do php "$t"; done
Contributing & Community
- Read
CONTRIBUTING.mdbefore opening a pull request. - Please follow our
CODE_OF_CONDUCT.md. - Release history is tracked in
CHANGELOG.md.
License
Licensed under GPL-2.0-only. Reuses and adapts pmahomme theme CSS, icons, and vendor assets (jQuery, Bootstrap 5, CodeMirror) from phpMyAdmin 5.2.3 under GPL-2.0-only. See LICENSE for full terms.