The following error has occured during databaseSetup-phase of PiWik installation:
Error while trying to connect to the Mysql database: SQLSTATE  Access denied for user 'xxx'@'localhost' (using password: YES)
Switching mysql-server from localhost to 127.0.0.1 does not help - it only generates the same error.
I am running Piwik on a shared-hosting solution without permission to change MySQL socket access rights, making this a show-stopper for my Piwik installation.
Try logging into the database from the command line (using "mysql"). If that fails, then it could mean your database and/or database user wasn't properly created.
This is not a Piwik problem: it looks like your user doesn't have permission to connect on this mysql server. please make sure your server adress, login, pwd are all correct.
Issue resolved: Typed 127.0.0.1 instead of localhost and installation works fine now.
If this is a common issue, I would suggest providing users with contextual help in installation program, or automatically resolve localhost to 127.0.0.1 in Piwik.
What if my error is something like this Could not connect to the database : SQLSTATE  Access denied for user 'root'@'localhost' (using password: NO)