matomo-org / matomo

Empowering People Ethically with the leading open source alternative to Google Analytics that gives you full control over your data. Matomo lets you easily collect data from websites & apps and visualise this data and extract insights. Privacy is built-in. Liberating Web Analytics. Star us on Github? +1. And we love Pull Requests!
https://matomo.org/
GNU General Public License v3.0
19.94k stars 2.66k forks source link

Provide new system check diagnostic for required database priviliges #17433

Open diosmosis opened 3 years ago

diosmosis commented 3 years ago

Summary

Matomo does not report if the database user does not have enough privileges to perform installation and update logic. One would expect that there would be an error thrown in this case, but it seems possible for this to fail silently. In this case, a diagnostic that checked for required privileges before installing would be helpful.

Refs https://github.com/matomo-org/matomo/issues/17420#issuecomment-814625793

tsteur commented 1 month ago

fyi I believe we may have this check in Matomo for WordPress already if I remember correctly. Not 100% sure though. Before working on this we could check what's there and potentially reuse ( or move it to core)

sgiehl commented 1 month ago

There is a check prior the installation here:

https://github.com/matomo-org/matomo/blob/dd3af291b2a9b56d8be996b27264321ef3e828d4/plugins/Installation/FormDatabaseSetup.php#L209-L289

But if the permissions are changed after Matomo was set up, I guess that would not automatically be detected somewhere.