sajdis Posted February 13, 2019 Share Posted February 13, 2019 Hey everyone, so sorry if I missed the right topic but I'm new using prestashop. Today I saw a problem that suddenly my page doesn't work. I turned on debug function and it gave me this error. What should I do next? Can someone help me fixing this? SQLSTATE[HY000] [1045] Access denied for user 'root@localhost' (using password: YES)at line 127 in file classes/db/DbPDO.php 122. public function connect() 123. { 124. try { 125. $this->link = $this->getPDO($this->server, $this->user, $this->password, $this->database, 5); 126. } catch (PDOException $e) { 127. throw new PrestaShopException('Link to database cannot be established: ' . $e->getMessage()); 128. } 129. 130. $this->link->exec('SET SESSION sql_mode = \'\''); 131. 132. return $this->link; DbPDOCore->connect - [line 330 - classes/db/Db.php] DbCore->__construct - [line 241 - classes/db/Db.php] - [4 Arguments] DbCore::getInstance - [line 48 - config/alias.php] pSQL - [line 340 - classes/shop/Shop.php] - [1 Arguments] ShopCore::initialize - [line 119 - config/config.inc.php] require - [line 27 - index.php] - [1 Arguments] Link to comment Share on other sites More sharing options...
sajdis Posted February 13, 2019 Author Share Posted February 13, 2019 Or the best way is to reinstall prestashop? Link to comment Share on other sites More sharing options...
JBW Posted February 17, 2019 Share Posted February 17, 2019 Prestashop can't connect to your database. Make sure it's up and running and user root has not changed to password. Link to comment Share on other sites More sharing options...
ohpasic Posted September 6, 2020 Share Posted September 6, 2020 (edited) +1 Hi Folks, I've just run exactly to this error one of my test servers.... All config files are correct user/password OK from bash user/password OK from phpmyadmin ... the tables seems correct, i've no idea what's wrong... Edited September 6, 2020 by ohpasic addition info (see edit history) Link to comment Share on other sites More sharing options...
ohpasic Posted September 6, 2020 Share Posted September 6, 2020 certeanly cache also cleared on filesystem... Link to comment Share on other sites More sharing options...
ohpasic Posted September 7, 2020 Share Posted September 7, 2020 14 hours ago, ohpasic said: +1 Hi Folks, I've just run exactly to this error one of my test servers.... All config files are correct user/password OK from bash user/password OK from phpmyadmin ... the tables seems correct, i've no idea what's wrong... Well .... I dunno how and why, PHP(7.[23])'s PDO class converts the given 127.0.0.1 host to FQDN of the server! I gave rights the db-user (access via FQDN), and PS started to work Very-very strange. If anyone can test the exact situation and have idea why it is happened, feel free to share 😉 Link to comment Share on other sites More sharing options...
Oakoo Posted September 23, 2020 Share Posted September 23, 2020 Hi, same problem here The access to the database don't work... Configuration : VPS Server + Plesk The "access denied" with 3 errors : Quote (1/3) PDOException // SQLSTATE[HY000] [1045] Access denied for user 'bdd_moldsmarket_admin'@'localhost' (using password: YES) (2/3) PDOException // SQLSTATE[HY000] [1045] Access denied for user 'bdd_moldsmarket_admin'@'localhost' (using password: YES) (3/3) ConnectionException // An exception occured in driver: SQLSTATE[HY000] [1045] Access denied for user 'bdd_moldsmarket_admin'@'localhost' (using password: YES) On 9/7/2020 at 6:56 AM, ohpasic said: Well .... I dunno how and why, PHP(7.[23])'s PDO class converts the given 127.0.0.1 host to FQDN of the server! I gave rights the db-user (access via FQDN), and PS started to work Very-very strange. If anyone can test the exact situation and have idea why it is happened, feel free to share 😉 what your solution here? i don't understand "give rights the db-user [...]". Thank You Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now