I got MySQL error during installation

Piwik seems to default to using a local socket (pipe) if the DB host is left at the default ‘localhost’ during Install. Local sockets are often blocked on shared hosting servers; this results in a MySQL connection error #111. Setting your Piwik installation’s database hostname as an IP address, such as 127.0.0., will force it connect via TCP port instead- which generally works just fine for most users running their websites on Windows or Linux server environments with Apache and PHP installed locally

Piwik appears to default use of “local” pipe connections when leaving Host blank without any other changes made by user during install process from Step 3 onwards of installer that defaults everything else except Database Name/Connection Type fields