Re: Socket error connecting to mySQL
| From: | Götz Lohmsnn | Date: | Tue, 04 Feb 2003 09:15:24 +0000 |
| Subject: | Re: Socket error connecting to mySQL | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-134228@lists.php.net to get a copy of this message | ||
Bryan Lipscy schrieb:
> $db= @mysql_pconnect ( $DB_HOST , $DB_USER , $DB_PASS );
> @mysql_select_db ( $DB_DB ) or die ( "DATABASE ERROR!".mysql_error() );
>
> Returns DATABASE ERROR!Can't connect to local MySQL server through
> socket '/tmp/mysql.sock' (2)
>
> MySQL server exists on a Win2ksp3 box.
> Apache with PHP 4.3.0 exists on a Slackware 8.1 box.
>
> All parameters are correct.
> Boxes can see each other.
> All php scripts work when run on the Win2k box.
>
>
> Any ideas why connecting to php/mysql would throw this error?
>
> Bryan
>
seems that PHP is trying to connect to a mysql database on localhost,
instead it is on the win2k box ... so maybe the $DB_HOST value is wrong ?
--
@ Goetz Lohmann, Germany | Web-Developer & Sys-Admin
\/ ------------------------------------------------------
() He's the fellow that people wonder what he does and
|| why the company needs him, until he goes on vacation.