I'm trying to set up WordPress. I have Apache and MySQL running and the accounts and databases are set up. I try to establish a simple connection:
I always get this:
Error: 2002 - No such file or Table of contents
What file or directory is it talking about?
I'm using OS X Snow Leopard, using the built-in Apache. I installed MySQL using x86_64 dmg.
Update: I discovered that the socket is located at /tmp/mysql.sock, so in php.ini I replaced all occurrences of the wrong path with that.
2 answers
If you are using Linux: The path to the mysql.sock file is wrong. This is usually because you are using (LAMPP) XAMPP and it is not in /tmp/mysql.sock
Open the php.ini file and find this line:
mysql.default_socket
Then do it
mysql.default_socket = /path/to/mysql.sock
I had a similar problem and was able to resolve my mysql issue by using 127.0.0.1 instead of localhost.
This probably means something is wrong with my hosting setup, but I need this quick fix right now.
Hot tools Tags
Hot Questions
Popular tool
vc9-vc14 (32+64 bit) runtime library collection (link below)
Download the collection of runtime libraries required for phpStudy installation
VC9 32-bit
VC9 32-bit phpstudy integrated installation environment runtime library
PHP programmer toolbox full version
Programmer Toolbox v1.0 PHP Integrated Environment
VC11 32-bit
VC11 32-bit phpstudy integrated installation environment runtime library
SublimeText3 Chinese version
Chinese version, very easy to use
Hot Topics
20416
7
13576
4






