kishoreunni Posted March 13, 2015 Share Posted March 13, 2015 (edited) Hai everyone can anyone please tell me what is the error associated with the above message? i passed the prestashop files from local site to remote site using filezilla. And i used openshift for hoisting my site. changed the '_DB_SERVER_', '_DB_NAME_', '_DB_USER_', '_DB_PASSWD_' inside the settings.inc.php inside config folder. but nothing changes. please help me. Thanks in advance. Edited March 13, 2015 by kishoreunni (see edit history) Link to comment Share on other sites More sharing options...
selectshop.at Posted March 13, 2015 Share Posted March 13, 2015 The error message says: the shop cannot connect to your database, it takes to much time for to verify credentials. Seems that credentials are not correct ? You should verify if the credentials of your new database. do correspond to the credentials added to /config/settings.inc.php Link to comment Share on other sites More sharing options...
selectshop.at Posted March 13, 2015 Share Posted March 13, 2015 DB_server in most of cases is "localhost" or "locasthost:3306" 3306 for the port if special port, or at least it could be also your domain: "your.domain.com". Ask your provider in any case. Link to comment Share on other sites More sharing options...
kishoreunni Posted March 13, 2015 Author Share Posted March 13, 2015 (edited) when i store _DB_SERVER_ as [email protected] it shows Link to database cannot be established: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known and also when i store xxxxxxxxx-xxx.xx.com it shows Link to database cannot be established: SQLSTATE[HY000] [2002] Connection refused when i store localhost or localhost:port no it shows Link to database cannot be established: SQLSTATE[HY000] [2002] Connection refused rest of them password,username,and dbname are correct. please help me Edited March 13, 2015 by kishoreunni (see edit history) Link to comment Share on other sites More sharing options...
selectshop.at Posted March 13, 2015 Share Posted March 13, 2015 (edited) You should ask your provider for the correct data to put there. There are several possible methods to connect to database, only your provider knows how he configured his server. Edited March 13, 2015 by selectshop.at (see edit history) Link to comment Share on other sites More sharing options...
joan16v Posted April 15, 2015 Share Posted April 15, 2015 I changed "localhost" to "127.0.0.1" and it works! 1 Link to comment Share on other sites More sharing options...
kishoreunni Posted April 15, 2015 Author Share Posted April 15, 2015 at last solved thanks every body. Link to comment Share on other sites More sharing options...
rmgoncalves Posted February 20, 2016 Share Posted February 20, 2016 hello what did you do to solve? can i do it using putty ? thank you Link to comment Share on other sites More sharing options...
mecollectibles Posted November 2, 2016 Share Posted November 2, 2016 It is really very bad that peoples ask questions on how to solve a problem but after they found a way to solve problems, they forget others to give the solution to them too. Do not be selfish & share what method you found. This is the purpose of this forum too. Link to comment Share on other sites More sharing options...
infocapimora Posted February 10, 2017 Share Posted February 10, 2017 Buenas me gustaría saber como solucionaron este tema, en mi caso me da el error: Link to database cannot be established: SQLSTATE[HY000] [2002] Connection refused Pero al ir a consultar el fichero setting.inc.php me sale vacio, solo con lo siguiente: <?php //@deprecated 1.7 ¿Alguna ayuda plis...? Gracias, Link to comment Share on other sites More sharing options...
rocky Posted February 11, 2017 Share Posted February 11, 2017 In PrestaShop v1.7, the database settings have moved to app/config/parameters.php, so check the database settings there are correct. Link to comment Share on other sites More sharing options...
consolerem Posted April 11, 2017 Share Posted April 11, 2017 I'm having suddenly this problem on my website: Link to database cannot be established: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known Why according to you? Link to comment Share on other sites More sharing options...
kdmonk1 Posted July 15, 2017 Share Posted July 15, 2017 I'm here because I update my php version from php 5 to php56. If you have admin right you can log into root and look for /etc/hosts. This file controls the location of localhost. I opened settings.inc.php and changed this define('_DB_SERVER_', 'localhost:3306'); to reference define('_DB_SERVER_', '127.0.0.1'); and now my website works! Link to comment Share on other sites More sharing options...
klemonnier Posted August 6, 2017 Share Posted August 6, 2017 QLSTATE[HY000] I got this error on upgrading my prestashop 1.7.1.1 to 1.7.2.0. I just reset the cache and all works fine Link to comment Share on other sites More sharing options...
spaziotecnologia Posted September 8, 2017 Share Posted September 8, 2017 I changed "localhost" to "127.0.0.1" and it works! THANKS it worked for me Link to comment Share on other sites More sharing options...
TiaNex Shopping Posted September 24, 2017 Share Posted September 24, 2017 i changed 127.0.0.1 to localhost and then it works , for i configured iptables but there is no rule allow 127.0.0.1 Link to comment Share on other sites More sharing options...
selectshop.at Posted September 24, 2017 Share Posted September 24, 2017 BTW natively "localhost" and "127.0.0.1" is the same thing. The problem is on your server configuration, i.e. server directives or firewall configuration are blocking one of both. So try both: 127.0.0.1 or localhost. Link to comment Share on other sites More sharing options...
premsaharan Posted January 29, 2018 Share Posted January 29, 2018 for prestashop 1.7.2.4, i moved by code from windows10 to production server, i did all required changes, parameters.php, database table changes like shop_url etc. still i got error while login in to admin panel, database access denied for username root@localhost, this was not even the setting on the server. and website was not accessible. Only thing worked for me was giving write permission on app/cache folder on the server. 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