summary refs log tree commit diff
path: root/nixos/modules/services/web-apps
diff options
context:
space:
mode:
authorJoachim F <joachifm@users.noreply.github.com>2017-08-06 22:58:52 +0100
committerGitHub <noreply@github.com>2017-08-06 22:58:52 +0100
commit9f93150ec927c0d06265727e2430d53a0b0ddfd3 (patch)
treee5db07a64c4c441fc017819ae5410b35c3539c62 /nixos/modules/services/web-apps
parenta40bf20a1d648521cef7f56eb987c4c732a2b4ea (diff)
parentd690701ff75e25638ad67be7b09af47d15b04833 (diff)
downloadnixlib-9f93150ec927c0d06265727e2430d53a0b0ddfd3.tar
nixlib-9f93150ec927c0d06265727e2430d53a0b0ddfd3.tar.gz
nixlib-9f93150ec927c0d06265727e2430d53a0b0ddfd3.tar.bz2
nixlib-9f93150ec927c0d06265727e2430d53a0b0ddfd3.tar.lz
nixlib-9f93150ec927c0d06265727e2430d53a0b0ddfd3.tar.xz
nixlib-9f93150ec927c0d06265727e2430d53a0b0ddfd3.tar.zst
nixlib-9f93150ec927c0d06265727e2430d53a0b0ddfd3.zip
Merge pull request #27820 from dalaing/piwik-install-doc-fix
nixos/piwik: clarifies setup documentation
Diffstat (limited to 'nixos/modules/services/web-apps')
-rw-r--r--nixos/modules/services/web-apps/piwik-doc.xml16
1 files changed, 12 insertions, 4 deletions
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:
+
       <programlisting>
+        # 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';
       </programlisting>
+
       Then fill in <literal>piwik</literal> 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 <literal>piwik</literal> unix
-      user to authenticate as <literal>piwik</literal> database (without needing a password), but no other users.
+      This authentication works by allowing only the <literal>piwik</literal> unix user to authenticate as the 
+      <literal>piwik</literal> database user (without needing a password), but no other users.
       For more information on passwordless login, see
       <link xlink:href="https://mariadb.com/kb/en/mariadb/unix_socket-authentication-plugin/" />.
     </para>