Can't login in my own Piwik installation

I’ve installed Piwik about three weeks ago and wanted to start using it today.

The problem is that I have no clue what mail address and password I used when installing it, normally my browser and password manager save these (but clearly not in this case).

I have acces to all the files through FTP and the database as well (of course, I installed it). So is there a way to reset the user(s) in Piwik and add a new one? (myself).

I hope there’s an easy solution, otherwise I guess I have to re-install Piwik from scratch.

Hi,

This FAQ entry should help:

https://matomo.org/faq/how-to/faq_191/

If you have questions about one of the steps, just ask.

@ Lukas: Thanks for the fast reaction.

I don’t know how to run the first command on that page, the server isn’t mine but it’s the provider’s server.

I do have access of the database through phpMyAdmin, is it possible to do with the help of that tool? If yes, where in phpMyAdmin should I enter that first command?

By the way, I found the credentials that I used when I created the Piwik installation 3 weeks ago, but I can’t even log in with these.

By the way, if I try to reset the password I get the following error: “Error: Form security failed. Please reload the form and check that your cookies are enabled. If you use a proxy server, you must configure Piwik to accept the proxy header that forwards the Host header. Also, check that your Referrer header is sent correctly.”

Hi,

It doesn’t matter where you run the first PHP command. If you don’t have PHP installed locally you can also use $2y$10$VQmuW3PTGzCIL3cYoBMLxuyuWhDKlvJBr5kbsBObVyJoLDR/MkJMm as the hash which corresponds to PleaseChangeThisPassword.

You can execute the SQL command

UPDATE `piwik_user` SET `password` = "$2y$10$VQmuW3PTGzCIL3cYoBMLxuyuWhDKlvJBr5kbsBObVyJoLDR/MkJMm" WHERE `login` = 'THE_USERNAME_OF_YOUR_ADMIN_USER' AND superuser_access = 1 

in the SQL tab in phpMyAdmin when you have selected the database. (If you don’t know the username you can change the password also manually when you open the piwik_user table)
grafik

Afterwards you should be able to login with PleaseChangeThisPassword.

Yes, you’re my hero!

I first changed the password in the piwik_user part of the database, that didn’t work (don’t know why). By the way, it was set to some really long string that I definitely didn’t create, and couldn’t have known in any way.

Next I ran the SQL command, and was able to reset the password (after clicking the confirmation link). Reset the password to what is was originally and everything is hunky dory again, and I’m a happy camper again!!!

1 Like