@florianjacob opened this Pull Request on February 26th 2018 Contributor

for new installations, replacing to support MySQL / MariaDB unix user authentication
out of the box.

Unix Socket Authentication does not work when the database host is given as, like the current default.

For the NixOS Linux distribution, I apply this patch downstream so that users only need to fill in matomo as username without creating, copying and storing a MySQL / MariaDB user pasword and are done.

This of course would require localhost to be defined somehow, but I never saw a distribution where there wasn't an entry e.g. in /etc/hosts.

Note that this is only affecting new installations, and if the database connection would fail, it could still be changed by the user to or whatever they need.

@robocoder commented on March 24th 2018 Contributor

The converse is also true. Leave it as and if it doesn't work, change it to localhost.

@robocoder commented on March 24th 2018 Contributor

Ref #1642

@robocoder commented on March 24th 2018 Contributor

A better idea might be for the installer to automatically figure out the right connection method.

@florianjacob commented on March 25th 2018 Contributor

Thanks! Did not know about the special mysql semantics for localhost (that it will result in using unix sockets), but now I see how the Unix socket authentication actually works and why it needs localhost.

I agree, the way to go is having the installer check whether it can connect via unix socket or tcp socket and fill in the first that works, or nothing if there is no local mysql server. I'll open an issue and document this, as I'm not sure whether I can figure that out.

This Pull Request was closed on March 25th 2018
Powered by GitHub Issue Mirror