Jump to content
  • 0
vasvra

Problem with my Database-cannot open site

Question

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

 

Share this post


Link to post
Share on other sites

7 answers to this question

Recommended Posts

  • 0

Hi Vekia. Thanks for looking at it. I have done nothing to the site for at least 2 weeks and it has been working Ok the last time i checked it.

 

My site is www.digitalelectronics.gr you can see it yourself

Edited by vasvra

Share this post


Link to post
Share on other sites
  • 0

strange,

perhaps you changed credentials  to your database? like login and password

are you able to verify it ? for example, with phpmyadmin ? (use credentials to connect to db like you've got in prestashop settings file)

Share this post


Link to post
Share on other sites
  • 0

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.

Share this post


Link to post
Share on other sites
  • 0

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

Share this post


Link to post
Share on other sites
  • 0

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

Share this post


Link to post
Share on other sites

×