DB Access Denied Error During Install

When I try to install the software, I get this error on the DB setup phase.

Error while trying to connect to the Mysql database: SQLSTATE[28000] [1045] Access denied for user 'esnse_piwik '@'localhost' (using password: YES)

The connection info should be fine since I’m able to use them to log in to the DB with PHPmyAdmin. Any ideas?

The software looks great, I’m looking forward to trying it out.

Is that a trailing space I see at the end of the user name?

Yes! Good call. I kept tweaking things, but I think I kept letting Firefox autocomplete that field after the first time I entered that field.

Hello folks,

nice to be here.

I get the same error message as I try to install piwik:

SQLSTATE[00000] [1045] Access denied for user: 'dbo279147148@localhost' (Using password: YES)

The difference to easea’s problem is that at my server backend the hostname is called localhost:/tmp/mysql5.sock, so the database is placed in a special socket instead of in localhost. That is, as my provider says, cause all other older dbs are in mysql4, and the newer ones in version 5 have to be placed in a special direction.

I checked all the install informations (pw+names) 3 times, they are correct - maybe there’s a way solving this problem by adding sth. to the config? Like a socket path? That’s out of my knowledge range. I would be very glad to get help, piwik looks and feels awesome and is right what we searched for our up-coming new page.

Thanks & greets

do you use the latest version? we’ve fixed a bug, now you can use DB hostname with unix sockets

Hm. I just downloaded the latest version and tried again, no chance …

Error while trying to connect to the Mysql database:
SQLSTATE[00000] [1045] Access denied for user: 'dbo279147148@localhost' (Using password: YES)

‘blabla@localhost’ is just showing that PIWIK isn’t interpreting the host correctly, right? What can I do to solve this?

Thanks for your support.

When you say you tried again, did you copy your previous config.ini.php or start from scratch?

And in config/config.ini.php, is your host wrapped in double quotes?

host = “localhost:/tmp/mysql5.sock”

I retried totally from scratch.
Also, the config.ini.php isn’t written yet, PIWIK doesn’t come to that step; the error message ocurs at step 3, so the ini isn’t written at all. There are just the config.ini.sample.php and the global.ini.php at the folder /config. So your second question is obsolete.

Additionally, I tried to write the config.ini.php manually, with all the db datas - the whole setup didn’t run anymore, at step 1 there comes this error message:

SQLSTATE[HY000] [2005] Unknown MySQL server host 'localhost:/tmp/mysql5.sock' (1)
Backtrace:

#0 /bablaurl/piwik/libs/Zend/Db/Adapter/Abstract.php(228): Zend_Db_Adapter_Pdo_Abstract->_connect()
#1 /bablaurl/piwik/core/Piwik.php(1179): Zend_Db_Adapter_Abstract->getConnection()
#2 /bablaurl/piwik/core/FrontController.php(234): Piwik::createDatabaseObject()
#3 /bablaurl/piwik/index.php(50): Piwik_FrontController->init()
#4 {main}

Maybe there are other ways to write the ini manually?

What might be sure is that the error comes somewhere from that “quotation marks”-problem …

Sorry for my english and thank’s for your support!

Sorry for pushing, but anyone knows help?

There must be a way to install PIWIK on a socket … I would be so happy! We so need PIWIK!

Try:

host = “localhost;unix_socket=/tmp/mysql5.sock”

Piwik will still set the host= and port= in the DSN (which is wrong according to http://www.php.net/manual/en/ref.pdo-mysql.connection.php)), but this presumably should work (for now).

Heeeey, awesome, that was it! I just tiped localhost;unix_socket=/tmp/mysql5.sock into the input field of the setup, and it went! Thank you very much! style_emoticons/<#EMO_DIR#>/smile.gif

Maybe there’s an option for me to add this information to the FAQ? For other people with the same problem?

So far

greets

This was a workaround because the pdo doesn’t strictly enforce then dsn.

A change has been commited to SVN where a unix socket (expressed as a path) translates into a unix_socket=/your_path, else it’s host=your_host;port=your_port.

I have the same issue, but with an already installed Piwik 0.5.4. Until yesterday everything was o.k., I made no changes and today I´ve got this:

SQLSTATE[28000] [1045] Access denied for user 'xxxxxxxx'@'localhost' (using password: YES)

Backtrace:

#0 /www/htdocs/xxxxxxxx/shop/tracking/libs/Zend/Db/Adapter/Pdo/Mysql.php(96): Zend_Db_Adapter_Pdo_Abstract->_connect()
#1 /www/htdocs/xxxxxxxx/shop/tracking/core/Db/Pdo/Mysql.php(30): Zend_Db_Adapter_Pdo_Mysql->_connect()
#2 /www/htdocs/xxxxxxxx/shop/tracking/core/Piwik.php(1479): Piwik_Db_Pdo_Mysql->getConnection()
#3 /www/htdocs/xxxxxxxx/shop/tracking/core/FrontController.php(218): Piwik::createDatabaseObject()
#4 /www/htdocs/xxxxxxxx/shop/tracking/index.php(103): Piwik_FrontController->init()
#5 {main}

Config.ini is o.k. (compared with an older backup), access to the database with PHPmyadmin is working.

Any idea what´s wrong?

Ask your sysadmin / hosting provider. These kinds of things don’t happen spontaneously.

Problem solved.

My hoster has made an mySQL-update, which is less fault tolerant.

The old config.ini.php had some space characters within the password field:

[database]
host = "localhost"
username = "123456"
password = "       PASSWORD"
dbname = "abcdefg"

New config.ini.php:

[database]
host = "localhost"
username = "123456"
password = "PASSWORD"
dbname = "abcdefg"

[quote=Karlsson @ Feb 23 2010, 07:34 AM]I have the same issue, but with an already installed Piwik 0.5.4. Until yesterday everything was o.k., I made no changes and today I´ve got this:

SQLSTATE[28000] [1045] Access denied for user 'xxxxxxxx'@'localhost' (using password: YES)

Backtrace:

#0 /www/htdocs/xxxxxxxx/shop/tracking/libs/Zend/Db/Adapter/Pdo/Mysql.php(96): Zend_Db_Adapter_Pdo_Abstract->_connect()
#1 /www/htdocs/xxxxxxxx/shop/tracking/core/Db/Pdo/Mysql.php(30): Zend_Db_Adapter_Pdo_Mysql->_connect()
#2 /www/htdocs/xxxxxxxx/shop/tracking/core/Piwik.php(1479): Piwik_Db_Pdo_Mysql->getConnection()
#3 /www/htdocs/xxxxxxxx/shop/tracking/core/FrontController.php(218): Piwik::createDatabaseObject()
#4 /www/htdocs/xxxxxxxx/shop/tracking/index.php(103): Piwik_FrontController->init()
#5 {main}

Config.ini is o.k. (compared with an older backup), access to the database with PHPmyadmin is working.

Any idea what´s wrong?[/quote]

When I went to log in on the day after a successful installation, I erroneously entered the wrong user name (or password, I don’t recall which).

And now whenever I return to the log in page, all I ever see is this error message. (I’ve even completely cleared the browser’s cache and history and etc.) I.e., the usual user name and password input fields aren’t even presented at all. Consequently I can not log in.

Furthermore, what I find SHOCKING is: the error message is revealing what I consider to be my private log-in user name of my web site! So now a would-be hacker has 1/2 of what he needs to get into my FTP account (for example).

So my questions are:

  1. What should I do to restore the usual index.php log-in screen?

  2. Is the code going to be changed so it does NOT reveal this private information?

  3. Is the code going to be fixed so that after one does enter an incorrect user name and/or password, it also presents the user name/password fields again (instead of just the core dump), allowing one to try again and actually log in?

Thank you for your help with this.

Aono: The error message is from MySQL. It appears you changed the MySQL user’s password without updating your Piwik configuration. Piwik would not have been able to create the tables otherwise.

In the upcoming 0.5.5 release, the stack trace is no longer printed – you’ll instead be redirected to the Installation screen.

So, to answer your questions:

  1. either edit config/config.ini.php, OR remove the file and go through the installer again; you’ll be offered the choice to delete or retain the existing tables

  2. no, this is a configuration error and the error message, in its entirety, is appropriate in this instance

  3. no; see above

I have been trying to install Piwik for the last 2 hours and am hung up on screen #3, setting up the database.
I have a 1 and 1 managed server. The database is set up.
1&1 tells me to use : localhost:/tmp/mysql5.sock
But Piwik returns error messages that seem to ignore the socket:

Error while trying to connect to the database server:
Access denied for user: ‘dbo4091xxxx@localhost’ (Using password: YES)

I spoke with 1and 1 and they agreed with all my settings and suggested I contact Piwik and ask if it supports mysql5.sock
So does it?

I tried shortening the password, reinserting all other fields and also using the following alternative server addresses:

localhost;unix_socket=/tmp/mysql5.sock (it is a Linux managed server)
127.0.0.1
$hostname=“localhost:/tmp/mysql5.sock”
/tmp/mysql5.sock:3316
localhost:/tmp/mysql5.sock:3316

Help!

In the installer, the host can be specified as:

  • hostname

  • IPaddress

  • host name:port

  • ipaddr:port

  • /sock/path - anything before the slash is ignored

  • localhost. - has a special meaning in php 5.3+; with mysqlnd, it means use the default sock path

Hi
Im getting database setup error when im installing piwiki.
"Error while trying to connect to the database server: SQLSTATE[HY000] [1045] Access denied for user ‘usename’@‘localhost’ (using password: YES) "
Can you pleas help on this issue