This Help forum is for issues relates to webtrees 1.7. For issues related to webtrees 2.0, please use that forum.
Before asking for help please read "Requesting Help and Suggestions" by clicking on that tab above here."
  • Page:
  • 1

TOPIC:

SQLSTATE[HY000] [2002] No such file or directory 3 months 4 days ago #1

  • maximinus
  • maximinus's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 17
Hi, all.
I need some help.

I recently tried to access webtrees on my server host, but failed.
I get the message:

The database reported the following error message:

SQLSTATE[HY000] [2002] No such file or directory

If you are the website administrator, you should check that:

the database connection settings in the file /data/config.ini.php are still correct
the directory /data and the file /data/config.ini.php have access permissions that allow the webserver to read them
you can connect to the database using other applications, such as phpmyadmin


I had to change passwords in the administration section of the provider because the previous went lost.
With the new ones I see that

config.ini.php is corrected
/data and /data/config.ini.php is accessible
In phpMyAdmin I can see and open the database

Do I need to restart something? when yes, how?
Unfortunately I do not know which version is installed, but it might be a pretty old one.
Regards
Webtrees 2.0
webtrees.bastir.at

Please Log in or Create an account to join the conversation.

SQLSTATE[HY000] [2002] No such file or directory 3 months 4 days ago #2

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 14515
This error usually means that you have used "localhost" for the database server in config.ini.php, instead of "127.0.0.1"
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

SQLSTATE[HY000] [2002] No such file or directory 3 months 4 days ago #3

  • maximinus
  • maximinus's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 17
Hi fisharebest
thank you for this advice.

I changed "localhost" for " 127.0.0.1" but now Firefox page remains white (no response at all).
Chrome says HTTP ERROR 500
This is my config.ini.php

; <?php exit; ?> DO NOT DELETE THIS LINE
dbhost="127.0.0.1"
dbport="3306"
dbuser="xxx"
dbpass="xxx"
dbname="usr_web128529_1"
tblpfx="wt_"


xxx replaces actual data
What else might be wrong. I have to say that I did not change anything on the server site. I only did not access it for a longer period of time. May be the provider did some upgrade?!
Regards
Webtrees 2.0
webtrees.bastir.at

Please Log in or Create an account to join the conversation.

SQLSTATE[HY000] [2002] No such file or directory 3 months 3 days ago #4

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 14515
> May be the provider did some upgrade?!

This is possible.

There are two ways to communicate with MySQL.

1) network - an IP address or a domain name.
2) socket - a special file.

You select "socket" by using "localhost".

BUT - PHP and MySQL must use the same filename for the socket. MySQL creates it, and other applications read/write to it. The error "SQLSTATE[HY000] [2002] No such file or directory" means that PHP was trying to use a socket file - but it does not exist.

I think you need to raise a ticket with your web host.
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

SQLSTATE[HY000] [2002] No such file or directory 3 months 3 days ago #5

  • maximinus
  • maximinus's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 17
As the complete datastructure of my webtrees site should be unchanged since I had access some time ago, i deleted config.ini.php and set it up again with actual data. The process completed without errors, finally I was asked to upload the config.ini.php into the /data directory which I did checked accessbility it has 444. Thereafter I klicked Enter and connected to genealogie.bastir.es/index.php.
But as before I get a empty page in Firefox. No error just a plain page. In Chrome the message this page does not work http error 500

What may be wrong?
Webtrees 2.0
webtrees.bastir.at

Please Log in or Create an account to join the conversation.

SQLSTATE[HY000] [2002] No such file or directory 3 months 3 days ago #6

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 14515
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

SQLSTATE[HY000] [2002] No such file or directory 3 months 3 days ago #7

  • Sir Peter
  • Sir Peter's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 153
If you are on a hosted webserver your provider might well have moved the database to a different server with a different IP address. That would explain why neither localhost nor 127.0.0.1 work any longer. Check with your provider.
Peter

Please Log in or Create an account to join the conversation.

SQLSTATE[HY000] [2002] No such file or directory 3 months 3 days ago #8

  • maximinus
  • maximinus's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 17
Sorry, our messages seems to have crossed.
I contacted flatbooster. com support, hope they can help.
Meantime a made a new setup on one.com which is up but also need some repair.
See separate topic "error 404 in media"

Regards Gerhard
Webtrees 2.0
webtrees.bastir.at

Please Log in or Create an account to join the conversation.

Do you need a web hosting solution for your webtrees site?
If you prefer a host that specialises in webtrees, the following page lists some suppliers able to provide one for you: 
  • Page:
  • 1
Powered by Kunena Forum