SamIk Posted August 15, 2018 Share Posted August 15, 2018 I am getting the below error after doing an upgrade when trying to log in to the BO. The front end shows a 500 error. Initially I did the upgrade using 1click upgrade and that broke the site with a 500 error. I then tried to do an upgrade using Plesk and recieved the below. Can anyone please help? [PrestaShopException] Link to database cannot be established:SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not knownat line 102 in file classes/db/DbPDO.php 97. public function connect() 98. { 99. try { 100. $this->link = $this->_getPDO($this->server, $this->user, $this->password, $this->database, 5); 101. } catch (PDOException $e) { 102. throw new PrestaShopException('Link to database cannot be established:'.$e->getMessage()); 103. } 104. 105. // UTF-8 support 106. if ($this->link->exec('SET NAMES \'utf8\'') === false) { 107. throw new PrestaShopException('PrestaShop Fatal error: no utf-8 support. Please check your server configuration.'); DbPDOCore->connect - [line 319 - classes/db/Db.php] DbCore->__construct - [line 240 - classes/db/Db.php] - [4 Arguments] DbCore::getInstance - [line 66 - config/alias.php] pSQL - [line 329 - classes/shop/Shop.php] - [1 Arguments] ShopCore::initialize - [line 114 - config/config.inc.php] require - [line 36 - admin/index.php] - [1 Arguments] Link to comment Share on other sites More sharing options...
Knowband Plugins Posted August 15, 2018 Share Posted August 15, 2018 Hi, Kindly verify the DB details in app/config/parameters.php file. Also, delete the all the folders from app/cache (Basically to delete the cache file) Link to comment Share on other sites More sharing options...
ricardogalmeida Posted July 17, 2019 Share Posted July 17, 2019 Hi, sorry i have the prestashop 1.7.3 and i have the same error. did u already solve the problem? Link to comment Share on other sites More sharing options...
Fred Peng Posted June 18, 2020 Share Posted June 18, 2020 I got this issue when my server hung up during the updating of several modules. Then I sort this issue out by stop and start MySQL. In Ubuntu system, I use below commands: sudo service mysql stop sudo service mysql start Link to comment Share on other sites More sharing options...
luisleitaoaudio Posted June 19, 2020 Share Posted June 19, 2020 Maybe credentials are not correct if you are using prestashop 1.7 check where its the db config file: 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