From ArchWiki
Revision as of 18:05, 18 January 2016 by Wabuo (talk | contribs) (typo)
Jump to navigation Jump to search

Adminer is a simple tool for database management. It's possible to manage MySQL, PostgreSQL, Sqlite3, MS SQL and Oracle.

It's a simpler alternative to PhpMyAdmin. You can find more pieces of information about this project at the official page or at Wikipedia.


Install the adminerAUR package or download Adminer and place it manually in the document-root instead.

When using the adminerAUR package, Adminer will be installed as /usr/share/webapps/adminer/index.php.

Ensure the correct extensions in /etc/php/php.ini are uncommented, e.g. should provide MySQL database management.



Add the following line to /etc/httpd/conf/httpd.conf:

Include conf/extra/httpd-adminer.conf

Then restart your apache daemon.

Adminer can now be accessed by browsing to http://localhost/adminer.

Note: It may be necessary to comment/remove the php_admin_value line inside /etc/httpd/conf/extra/httpd-adminer.conf, because the PHP-configuration does not allow it.


Ensure that the php FastCGI interface is configured correct.

Then add the following server block to your /etc/nginx/nginx.conf or place it in a file under /etc/nginx/servers-available/ and enable it:

server {
        listen 80;
        server_name db.domainname.dom;
        root /usr/share/webapps/adminer;

        # If you want to use a .htpass file, uncomment the three following lines.
        #auth_basic "Admin-Area! Password needed!";
        #auth_basic_user_file /usr/share/webapps/adminer/.htpass;
        #access_log /var/log/nginx/adminer-access.log;

        error_log /var/log/nginx/adminer-error.log;
        location / {
                index index.php;
                try_files $uri $uri/ /index.php?$args;

       location ~ .php$ {
             include fastcgi.conf;
             #fastcgi_pass localhost:9000;
             fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
             fastcgi_index index.php;
             fastcgi_param SCRIPT_FILENAME /usr/share/webapps/adminer$fastcgi_script_name;

Afterwards restart nginx.


Ensure that the php FastCGI interface is configured correct.

Then add the following VirtualHost block to your /etc/hiawatha/hiawatha.conf.

VirtualHost {

    # If you set WebsiteRoot to /usr/share/webapps/adminer you don't need followsymlinks
    # I symlinked the adminer folder to '/srv/http/adminer' so that I can easily remember where it's located but
    # still set 'WebsiteRoot' to the real source directory. You could point WebsiteRoot to the
    # symlinked directory, but you will have to set 'FollowSymlinks = yes' for that to function properly

    #FollowSymlinks = yes
    #WebsiteRoot = /srv/http/adminer
    WebsiteRoot = /usr/share/webapps/adminer
    Hostname = adminer
    AccessLogfile = /var/log/hiawatha/adminer/access.log
    ErrorLogfile = /var/log/hiawatha/adminer/error.log
    StartFile = index.php
    UseFastCGI = PHP7


Then restart the hiawatha.service.

See also