From d690701ff75e25638ad67be7b09af47d15b04833 Mon Sep 17 00:00:00 2001 From: Dave Laing Date: Tue, 1 Aug 2017 09:23:02 +1000 Subject: nixos/piwik: clarifies setup documentation The piwki setup documentation as it stands has two issues: - the `ALTER USER root` line does not work with MariaDB or MySQL 5.5 - the auth plugin details vary between MariaDB and MySQL --- nixos/modules/services/web-apps/piwik-doc.xml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'nixos/modules/services/web-apps') diff --git a/nixos/modules/services/web-apps/piwik-doc.xml b/nixos/modules/services/web-apps/piwik-doc.xml index a1d8a5b7556a..21342d4454fb 100644 --- a/nixos/modules/services/web-apps/piwik-doc.xml +++ b/nixos/modules/services/web-apps/piwik-doc.xml @@ -23,16 +23,24 @@ and enter those credentials in your browser. You can use passwordless database authentication via the UNIX_SOCKET authentication plugin with the following SQL commands: + + # For MariaDB INSTALL PLUGIN unix_socket SONAME 'auth_socket'; - ALTER USER root IDENTIFIED VIA unix_socket; CREATE DATABASE piwik; - CREATE USER 'piwik'@'localhost' IDENTIFIED VIA unix_socket; + CREATE USER 'piwik'@'localhost' IDENTIFIED WITH unix_socket; + GRANT ALL PRIVILEGES ON piwik.* TO 'piwik'@'localhost'; + + # For MySQL + INSTALL PLUGIN auth_socket SONAME 'auth_socket.so'; + CREATE DATABASE piwik; + CREATE USER 'piwik'@'localhost' IDENTIFIED WITH auth_socket; GRANT ALL PRIVILEGES ON piwik.* TO 'piwik'@'localhost'; + Then fill in piwik as database user and database name, and leave the password field blank. - This works with MariaDB and MySQL. This authentication works by allowing only the piwik unix - user to authenticate as piwik database (without needing a password), but no other users. + This authentication works by allowing only the piwik unix user to authenticate as the + piwik database user (without needing a password), but no other users. For more information on passwordless login, see . -- cgit 1.4.1