diff options
author | Dave Laing <dave.laing.80@gmail.com> | 2017-08-01 09:23:02 +1000 |
---|---|---|
committer | Dave Laing <dave.laing.80@gmail.com> | 2017-08-02 08:38:16 +1000 |
commit | d690701ff75e25638ad67be7b09af47d15b04833 (patch) | |
tree | 55a4c5fbd2d32592b523f2b243d751b8108ca0d7 /nixos/modules/services/web-apps | |
parent | af84611f0c4e205a516682b3a9dcd3d490a08068 (diff) | |
download | nixlib-d690701ff75e25638ad67be7b09af47d15b04833.tar nixlib-d690701ff75e25638ad67be7b09af47d15b04833.tar.gz nixlib-d690701ff75e25638ad67be7b09af47d15b04833.tar.bz2 nixlib-d690701ff75e25638ad67be7b09af47d15b04833.tar.lz nixlib-d690701ff75e25638ad67be7b09af47d15b04833.tar.xz nixlib-d690701ff75e25638ad67be7b09af47d15b04833.tar.zst nixlib-d690701ff75e25638ad67be7b09af47d15b04833.zip |
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
Diffstat (limited to 'nixos/modules/services/web-apps')
-rw-r--r-- | nixos/modules/services/web-apps/piwik-doc.xml | 16 |
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> |