Button Button

Sputnik can store its data in an SQLite3 or MySQL database using corresponding Versium plugins.

The instructions for the two databases are given below separately. Both assume a standard installation of Sputnik "Earth" (see Installation), though those plugins can also be used with Saci/Versium outside Sputnik.

SQLite3

First, install versium-sqlite3 rock:

./bin/luarocks install --only-from=http://sputnik.freewisdom.org/rocks/earth/ versium-sqlite3

Then set two config variables

VERSIUM_STORAGE_MODULE = "versium.sqlite3", 
VERSIUM_PARAMS = {'/home/yuri/sputnik/wiki-data.db'},

That wiki-data.db file does not need to exist - Versium-SQLite3 will create it for you. But make sure that your server has permissions to create the file.

MySQL

First, install versium-mysql rock:

./bin/luarocks install --only-from=http://sputnik.freewisdom.org/rocks/earth/ versium-mysql

Second, set two config variables

    VERSIUM_STORAGE_MODULE = "versium.mysql", 
    VERSIUM_PARAMS = {"sputnik_db", "sputnik", "letmein", "localhost"},

The parameters here specify: (1) the name of the database, (2) the user name for the database, (3) the password, (4) the host, (5) optionally the port number.

You will also need to make sure that the database exists on the host and is accessible to this user with this password. E.g.:

$ sudo mysql -pmyl33tpa$$w0rd
mysql> create user 'sputnik' identified by 'letmein';
mysql> grant all on *.* to 'sputnik';
mysql> create database sputnik_db;