[Techtalk] at wit's end with PHP to MySQL

Mary Gardiner linuxchix at puzzling.org
Thu Jan 31 13:42:18 EST 2002

On Wed, Jan 30, 2002 at 08:24:49PM -0500, Linda wrote:
> Apache and PHP works together, but when I try to use PHP to 
> connect to MySQL, I get the error message "Can't connect to local 
> MySQL server on socket /tmp/mysql.sock"
> According to phpinfo( ), I have a built of PHP that has MySQL.
> I have no clue what is wrong. I have tried all the solutions I have 
> been able to find on the web.

OK, just to get some background on your situation:

What were the solutions you tried?

Can you connect to MySQL from the command line? (ie type "mysql" at the

What's the result of typing "ps aux | grep mysql"? (The command "ps aux"
lists all processes currently running on your box, the "|" means send
that output to the next program as input rather than dumping it on the
screen, and "grep mysql" will print any lines containing the word
"mysql" in them - this way we can find out if MySQl is actually running
on your system).


Mary Gardiner
<mary at puzzling.org>

More information about the Techtalk mailing list