Jump to content

Problem with my Database-cannot open site


Recommended Posts

Hi

 

I hope somebody can help me. All of a sudden I cannot open the site or the admin section. I get the following message

 

Fatal error: Uncaught Link to database cannot be established: SQLSTATE[HY000] [2002] No such file or directory thrown in /home/www/xxxxxxxx/classes/db/DbPDO.php on line 57

 

My server checked the data base and found no problem and says it is a script error. I will appreciate some help

 

Link to comment
Share on other sites

Hi Vekia

 

I do get in the database. No problem. The server checked the data base and said it is Ok and also the php test like http://xxxxxxxxxxxx/1mysql.php

 

The only think that come to my mind is that 2 weeks ago I tried to install Prestashop 1.6 but in subdirectory but there I created a new data base. i will try and go back step by step what I did just in case.

Link to comment
Share on other sites

  • 2 years later...

and what about database credentials in your configuration file? 

 

I have similar problem. 

I havent changed any of dbname user name or password. 

what can be problem

www.hedeftoner.com

Link to database cannot be established: SQLSTATE[HY000] [2002] No such file or directory

thanks

Link to comment
Share on other sites

When I use php 5.5 version it gives following error:

Fatal error: Call to undefined function mysql_connect() in /home/???????/public_html/classes/db/MySQL.php on line 37

 

when I use native php 5.5 version it gives:

Link to database cannot be established: SQLSTATE[HY000] [2002] No such file or directory 

 

when I use php 7.0 version it gives:

Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /home/???/public_html/classes/db/MySQL.php:37 Stack trace: #0 /home/?/public_html/classes/db/Db.php(242): MySQLCore->connect() #1 /home/???/public_html/classes/db/Db.php(199): DbCore->__construct('localhost', 'database_user', 'password32423...', 'database_db') #2 /home/??/public_html/config/alias.php(64): DbCore::getInstance() #3 /home/??/public_html/classes/shop/Shop.php(304): pSQL('www.hedeftoner....') #4 /home/???/public_html/config/config.inc.php(90): ShopCore::initialize() #5 /home/???/public_html/admin/index.php(30): require('/home/??/...') #6 {main} thrown in /home/??/public_html/classes/db/MySQL.php on line 37

Link to comment
Share on other sites

×
×
  • Create New...