Adminer¶
Adminer (formerly phpMinAdmin) is a full-featured database management tool written in PHP. Conversely to phpMyAdmin, it consist of a single file ready to deploy to the target server. Adminer is available for MySQL, MariaDB, PostgreSQL, SQLite, MS SQL, Oracle, Firebird, SimpleDB, Elasticsearch and MongoDB.
Note
Uberspace provides instances of Adminer and phpMyAdmin for everbody to use. Therefore this guide is mainly for people who would like to customize Adminer to there needs.
Adminer: https://mysql.uberspace.de/adminer/
phpMyAdmin: https://mysql.uberspace.de/phpmyadmin/
License¶
Adminer is released under Apache License 2.0 or GPL 2.
Installation (with Plugin Support)¶
Check the current version of Adminer at GitHub and go the the folder where you want Adminer to be installed
[isabell@stardust ~]$ VERSION=4.7.8
[isabell@stardust ~]$ cd ~/html
[isabell@stardust html]$ wget -O adminer.php https://github.com/vrana/adminer/releases/download/v$VERSION/adminer-$VERSION.php
[isabell@stardust html]$ mkdir -p plugins
[isabell@stardust html]$ wget -O plugins/plugin.php https://raw.githubusercontent.com/vrana/adminer/master/plugins/plugin.php
[isabell@stardust html]$
Create an index.php
file in the same directory:
<?php
function adminer_object() {
foreach (glob("plugins/*.php") as $filename) {
include_once "./$filename";
}
$plugins = array(
// ...
);
return new AdminerPlugin($plugins);
}
include "./adminer.php";
This will include all plugins located in the plugins
folder. To use a plugin you also need to initialize it inside the $plugins
array.
You can find a list of available Plugins here.
Example Plugin: Themes¶
[isabell@stardust html]$ THEME_VERSION=1.7
[isabell@stardust html]$ wget -O theme.zip https://github.com/pematon/adminer-theme/archive/v$THEME_VERSION.zip
[isabell@stardust html]$ unzip -o theme.zip
[isabell@stardust html]$ cp -r adminer-theme-$THEME_VERSION/lib/* .
[isabell@stardust html]$ rm -rf theme.zip adminer-theme-$THEME_VERSION
[isabell@stardust html]$
Update the index.php
to include the new Plugin:
<?php
function adminer_object() {
foreach (glob("plugins/*.php") as $filename) {
include_once "./$filename";
}
$plugins = array(
new AdminerTheme("default-orange")
);
return new AdminerPlugin($plugins);
}
include "./adminer.php";
Updates¶
Just repeat the installation steps with the new VERSION
.
Tested with Adminer 4.7.8, Uberspace 7.8.0.0
Written by: Nikolas <https://nikolasdas.de>