Keep Getting Error SQLSTATE[HY000] [2002] No such file or directory
I am really new to this and I have no clue what I am doing! I barely fixed the missing .htaccess much less able to even understand this error. Once again: "SQLSTATE[HY000] [2002] No such file or directory" was the error. I request any help I can get! Please explain to a noob at this!
Best Answer
-
UnderDog MVP
Pure a php / mySQL problem. I've googled for you and found these results:
https://www.google.com/search?hl=en&as_q=SQLSTATE[HY000]+[2002]+No+such+file+or+directory&as_epq=&as_oq=&as_eq=&as_nlo=&as_nhi=&lr=&cr=&as_qdr=all&as_sitesearch=&as_occt=any&safe=images&tbs=&as_filetype=&as_rights=Promising results from the google results:
http://prattski.com/2010/08/05/magento-install-mysql-error-sqlstatehy000-2002-no-such-file-or-directory/
http://stackoverflow.com/questions/2412009/starting-with-zend-tutorial-zend-db-adapter-throws-exception-sqlstatehy000
http://stackoverflow.com/questions/2138959/confusing-pdo-only-problem-cant-connect-through-socket-access-denied-cant-coHope you can resolve the problem.
Always tell if you are installing on your local PC or on your host.There was an error rendering this rich post.
0
Answers
something to do with the path to mysql socket probably. look in php.ini
look in php.ini and google SQLSTATE[HY000] [2002] No such file or directory
lots of solutions depending on what you did.
its a sql php setup problem not a vanilla problem.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Pure a php / mySQL problem. I've googled for you and found these results:
https://www.google.com/search?hl=en&as_q=SQLSTATE[HY000]+[2002]+No+such+file+or+directory&as_epq=&as_oq=&as_eq=&as_nlo=&as_nhi=&lr=&cr=&as_qdr=all&as_sitesearch=&as_occt=any&safe=images&tbs=&as_filetype=&as_rights=
Promising results from the google results:
http://prattski.com/2010/08/05/magento-install-mysql-error-sqlstatehy000-2002-no-such-file-or-directory/
http://stackoverflow.com/questions/2412009/starting-with-zend-tutorial-zend-db-adapter-throws-exception-sqlstatehy000
http://stackoverflow.com/questions/2138959/confusing-pdo-only-problem-cant-connect-through-socket-access-denied-cant-co
Hope you can resolve the problem.
Always tell if you are installing on your local PC or on your host.
There was an error rendering this rich post.
I MUST SAY, that was much easier than i thought! I like UnderDog's!
However, I did it and it was all fine and dandy but now it gives me the exact same error!
Again, I am new, sorry for giving a lack of information, I am installing this locally, I have tried the solutions mentioned in the previous post you made. This is what keeps happening!
SQLSTATE[HY000] [2002] No such file or directory
Ok, so local PC. I will assume on a Windows PC. Do you have the Windows FireWall? Do you have a virusscanner that's over protective? Another fireWall?
Google for the error message plus your windows version:
"SQLSTATE[HY000] [2002] No such file or directory" + "Windows XP Home Premium" (or something like that). The quotes are needed first and then you can let go of them once you've browsed through the first google results.
Stackoverflow is always a good place to start:
"SQLSTATE[HY000] [2002] No such file or directory" + "Windows XP Home Premium" site:stackoverflow.com
If you get worse results, just leave out the 'home premium part'
There was an error rendering this rich post.
Mac.
Typing longer replies yields more help. Usually !
There was an error rendering this rich post.
So, I hope you want to follow the google links, google search results, etc, etc.
Try some things, write down what doesn't work. Give as much information as you can when you reply next time.
We're out of ideas here and google is your friend. Good luck.
There was an error rendering this rich post.
Same problem, google didn't help, different error code produced:
SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: nodename nor servname provided
What is your server OS?
Is it your server or is somebody hosting it.
Did you run phpinfo()?
Have you posted to a sql site where there sql experts?
what version of sql are you using?
what version of php are you using?
Did you install it yourself?
did you try to reinstall sql?
did you try to reinstall php?
can you run anything with sql on your site?
can you run phpmyadmin?
Answer all the questions? then double check and answer them again? then try to re-install
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
That was a lot of things! My server OS is Mac Lion, I am hosting it, I don't know what phpinfo() is! (I am really new at this) I have not posted there, I am using 6.0 of sql, i don't know about php. I did install and reinstall them, I can run the setup part of the site, and What is phpmyadmin?
google is your friend. knowing the answers to the questions will help you in the long run. Being new doesn't stop you from googling phpinfo and running it. same with phpmyadmin. And you can google "how do I find php version? Then when you post to a sql site you will be able to provide the details.
I don't know anything about macs.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
What I would do is think about a package that combines PHP, MySQL and Apache (or the Mac equivalent, whatever that may be).
I think you installed those components yourself and something is conflicting.
The package that combines those 3 vital items is called 'MAMP'
If you are going to ask 'what is MAMP and where can I find it', I am going to cry.
Think about installing MAMP instead of what you have running at the moment.
This error message : php_network_getaddresses: getaddrinfo failed: nodename nor servname provided looks to me like it's a TCP / IP conflict. Go for MAMP.
There was an error rendering this rich post.