{"id":321,"date":"2023-07-16T11:34:47","date_gmt":"2023-07-16T11:34:47","guid":{"rendered":"https:\/\/www.ehcp.net\/?p=321"},"modified":"2023-08-13T20:38:08","modified_gmt":"2023-08-13T20:38:08","slug":"access-denied-for-user-ehcplocalhost","status":"publish","type":"post","link":"https:\/\/www.ehcp.net\/?p=321","title":{"rendered":"Access denied for user &#8216;ehcp&#8217;@&#8217;localhost&#8217;"},"content":{"rendered":"\n<p>Access denied for user &#8216;ehcp&#8217;@&#8217;localhost&#8217; (using password: YES)<\/p>\n\n\n\n<p>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.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>Question:<\/p>\n\n\n\n<p>I always get this error :<br>Warning: mysql_connect() [function.mysql-connect]: Access denied for user &#8216;ehcp&#8217;@&#8217;localhost&#8217; (using password: YES) in \/var\/www\/vhosts\/ehcp\/config\/adodb\/drivers\/adodb-mysql.inc.php on line 365<br>Error Occured while connecting to db, check your db settings&#8230;<br>This is mostly caused by wrong ehcp password in config.php<br>if you just installed ehcp, then learn\/know your ehcp root password, then re-install ehcp..<\/p>\n\n\n\n<p>I have tried 3 times to reinstall it, but error remain. And I&#8217;ve checked config.php and it&#8217;s ok.<br>And I saw that there is not some new ehcp user in mysql or ehcp table&#8230; Maybe it can&#8217;t connect to mysql server at installing? But I know 100% that password is correct.<\/p>\n\n\n\n<p>Answer:<\/p>\n\n\n\n<p>which version do you use ?<br>latest version is 0.29.12 and it does not install if you dont provide right password,<\/p>\n\n\n\n<p>so, download latest version from&nbsp;<a href=\"http:\/\/www.ehcp.net\/download\">www.ehcp.net\/download<\/a><\/p>\n\n\n\n<p>check your pass in config.php,<\/p>\n\n\n\n<p>then, use that pass to check connection to mysql:<\/p>\n\n\n\n<p>on server console:<br>mysql -u ehcp -p<br>then enter your password,<br>if it accepts, it is ok.<br>if not, your ehcp user in mysql is not correct.<br>make it correct.<\/p>\n\n\n\n<p>i may also connect by ssh and investigate, if you wish.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>also, at the end of installation there is such errors:<br>language error: (error_occured) is not defined in currentlanguage of:(en) please define $this-&gt;lang[&#8216;en&#8217;][&#8216;error_occured&#8217;]=&#8221;&#8230;&#8230;..&#8221;; in language\/en.php (source:Error sending info to daemon (sync dns) (executequery: insert into operations (op,action,info,info2,tarih) values (&#8216;syncdns&#8217;,&#8221;,&#8221;,&#8221;,&#8221;)))err: Unknown database &#8216;ehcp&#8217;last db error:Unknown database &#8216;ehcp&#8217;<\/p>\n\n\n\n<p>as you see there is Unknown database &#8216;ehcp&#8217;<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>I solved the problem. The problem was with the mysql root password. Maybe when you entering it and the script checking it &#8211; the check goes well&#8230; but when the script trying to make some real queries for creation DB etc. it can&#8217;t connect.. I think the problem is with symbols in the mysql root pass, I think with &#8216;(&#8216; or &#8216;!&#8217;&#8230;<br>So I changed mysql root password to something simple like &#8216;newpassword&#8217; and installation was successful.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Access denied for user &#8216;ehcp&#8217;@&#8217;localhost&#8217; (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 &#8216;ehcp&#8217;@&#8217;localhost&#8217; (using password: YES) [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":326,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"blocksy_meta":[],"_links":{"self":[{"href":"https:\/\/www.ehcp.net\/index.php?rest_route=\/wp\/v2\/posts\/321"}],"collection":[{"href":"https:\/\/www.ehcp.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ehcp.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ehcp.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ehcp.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=321"}],"version-history":[{"count":1,"href":"https:\/\/www.ehcp.net\/index.php?rest_route=\/wp\/v2\/posts\/321\/revisions"}],"predecessor-version":[{"id":323,"href":"https:\/\/www.ehcp.net\/index.php?rest_route=\/wp\/v2\/posts\/321\/revisions\/323"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ehcp.net\/index.php?rest_route=\/wp\/v2\/media\/326"}],"wp:attachment":[{"href":"https:\/\/www.ehcp.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=321"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ehcp.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=321"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ehcp.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=321"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}