I've uploaded the latest version of Piwik unto my web server, which is hosted by go daddy.com, on a linux hosting plan. I'm setting it up (accessing it from my browser as instructed) and I have the "Piwik>installation" page open on step 3 (database set-up ) of 9. I don't know what to imput in the field "database server"... the default is the number

When I leave that input as is, and click "Next" leaving the gives the error:

"Error when trying to connect to database server: SQLSTATE[HY000] [2013] Lost connection to MySQL server at 'reading initial communication packet', system error: 111"

and changing that input to "localhost" gives me another error:

"Error when trying to connect to database server:SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)"

2 Answers 2


GoDaddy doesn't allow localhost as a db server:
What server should I use in my code to connect to my database? in the Help Center.

Also Setting up a MySQL or SQL Server Database for Your Hosting Account


Here is what I did. Obviously, your host won't let piwik install database. You have to set it yourself. For that, you have to choose the following:

  1. MySQL Database/User Name
  2. Password
  3. read Only User Name (not needed here)

Now, going back to Piwik installation page, enter the following:

  • Database server: put in your database's host name, you should find it in the database information section of your hosting provider. Should be like: databasename.db.0000000.hostedressource.com
  • Login: put your User Name chosen in 1.
  • password: put your password chosen in 2.
  • database Name: same as MySQL Database/User Name chosen in 1.

Hope that helps someone. If you have any trouble with setting up a database on your own, your hosting provider will help.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.