Skip to content
Jakub Vrána edited this page Aug 30, 2021 · 8 revisions

Note: there is precompiled versions of Adminer for SQLite that can be used immediately by just loading the Adminer dedicated version for SQLite3.

Ensure System field is showing on the login form

Comment out AdminerLoginServers if it is present in the index.php

        // new AdminerLoginServers([
            // filter_input(INPUT_SERVER, 'HTTP_HOST') => filter_input(INPUT_SERVER, 'SERVER_NAME')
        // ]),

Create / edit index.php to enable plugins and enable the password-less login plugin

<?php
# index.php
function adminer_object()
{
    // Required to run any plugin.
    include_once "./plugins/plugin.php";

    // Plugins auto-loader.
    foreach (glob("plugins/*.php") as $filename) {
        include_once "./$filename";
    }

    // Specify enabled plugins here.
    $plugins = [
    
        // show / allow list of servers by commenting this out...
        // new AdminerLoginServers([
            // filter_input(INPUT_SERVER, 'HTTP_HOST') => filter_input(INPUT_SERVER, 'SERVER_NAME')
        // ]),
        
        //  allow sqlite with login-password-less plugin and selecting sqlite3 server type and put full path to sqlite database file in database field.
           new AdminerLoginPasswordLess("sladmin", password_hash("mypassword", PASSWORD_DEFAULT)),

   ];

    return new AdminerPlugin($plugins);
}

// Include original Adminer or Adminer Editor.
include "./adminer.php";

Install the plugins/#-password-less.php

Get this file and place it in plugins/
https://raw.github.com/vrana/adminer/master/plugins/#-password-less.php

Also put plugins.php in that folder if it's not already there.

Select sqlite3 in the system field.

Select sqlite3.

Fill in the login fields

Using the username/password in the index.php above.

  • username: sladmin
  • password: mypassword
  • database: Enter the full path to the sqlite file . eg: /srv/web/lpa346/db/development.sqlite3

Press the login button.

Done

You can now use adminer on that file.


Reference:

https://sourceforge.net/p/adminer/discussion/960418/thread/211bcb85/

https://sourceforge.net/p/adminer/discussion/1095138/thread/36320718/#9589