-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Enable sqlite3
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.
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')
// ]),
<?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";
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.
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.
You can now use adminer on that file.
https://sourceforge.net/p/adminer/discussion/960418/thread/211bcb85/
https://sourceforge.net/p/adminer/discussion/1095138/thread/36320718/#9589