Access denied for user ‘ehcp’@’localhost’

Access denied for user ‘ehcp’@’localhost’ (using password: YES)

This error may happen if you changed your ehcp mysql dbuser pass, either restore it, or change pass in config.php too, in /var/www/vhosts/ehcp dir, or alternatively, you may re-install ehcp.


Question:

I always get this error :
Warning: mysql_connect() [function.mysql-connect]: Access denied for user ‘ehcp’@’localhost’ (using password: YES) in /var/www/vhosts/ehcp/config/adodb/drivers/adodb-mysql.inc.php on line 365
Error Occured while connecting to db, check your db settings…
This is mostly caused by wrong ehcp password in config.php
if you just installed ehcp, then learn/know your ehcp root password, then re-install ehcp..

I have tried 3 times to reinstall it, but error remain. And I’ve checked config.php and it’s ok.
And I saw that there is not some new ehcp user in mysql or ehcp table… Maybe it can’t connect to mysql server at installing? But I know 100% that password is correct.

Answer:

which version do you use ?
latest version is 0.29.12 and it does not install if you dont provide right password,

so, download latest version from www.ehcp.net/download

check your pass in config.php,

then, use that pass to check connection to mysql:

on server console:
mysql -u ehcp -p
then enter your password,
if it accepts, it is ok.
if not, your ehcp user in mysql is not correct.
make it correct.

i may also connect by ssh and investigate, if you wish.


also, at the end of installation there is such errors:
language error: (error_occured) is not defined in currentlanguage of:(en) please define $this->lang[‘en’][‘error_occured’]=”……..”; in language/en.php (source:Error sending info to daemon (sync dns) (executequery: insert into operations (op,action,info,info2,tarih) values (‘syncdns’,”,”,”,”)))err: Unknown database ‘ehcp’last db error:Unknown database ‘ehcp’

as you see there is Unknown database ‘ehcp’


I solved the problem. The problem was with the mysql root password. Maybe when you entering it and the script checking it – the check goes well… but when the script trying to make some real queries for creation DB etc. it can’t connect.. I think the problem is with symbols in the mysql root pass, I think with ‘(‘ or ‘!’…
So I changed mysql root password to something simple like ‘newpassword’ and installation was successful.