Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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 127.0.0.1

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)"

share|improve this question

migrated from webapps.stackexchange.com Sep 27 '11 at 19:17

This question came from our site for power users of web applications.

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

share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.