Selecting the database engineΒΆ

To select a database server, run getlino configure with --db-engine. This option has currently three choices: mysql, postgresql or sqlite3. The default value is either mysql (when running as root) or sqlite3 otherwise. mysql will install either mariadb (Debian) or mysql (Ubuntu).

For mysql and postgresql you may additionally specify a db-port, a db-user and db-password.

Shared database user

The db-user and db-password will not be used directly, but they will be stored as the default values for all subsequent calls to getlino startsite.

If --db-user is empty, getlino startsite will create a new user for each new site. If it is not empty, all sites will share the same database username. The latter is less secure but convenient on a server having all sites owned by a same site operator.

On a server with a shared database user you must also specify a --db-password for getlino configure.

Every subsequent getlino startsite run will

  • install the Python packages required by the selected db-engine into the site's virtualenv.

  • create a database named PRJNAME

  • create a user PRJNAME with a password and grant all privileges to that user

  • Store these in the DATABASES of the site's settings.py

  • Run the install command to install additional dynamic dependencies.

If you run getlino startsite with a given database engine and then manually change the DATABASES setting of your site, you must yourself care about installing the corresponding Python package. Lino's install command cannot automatically install the Python package for the database engine. This is explicitly done by getlino startsite.