9 msgScripts slowing down?
2 msgcalling rsync from php script
1 msgcn2 dot php.net can't be included in the mail.
5 msgtracking Mials Which were bounced.
21 msgGood HTML parser needed
4 msgusing variable in php form before the form is P...
2 msgphp_svn.dll with Apache/2.0.63
1 msgsession.auto_start Linux vs Windows
4 msgPermissions set on php script question
11 msgReplacing accented characters by non-accented c...
6 msgconvert query result to array
2 msgPHP and a misbehaving contact form
10 msgGood XML Parser
3 msgIgnore Tags
4 msgmysql_pconnect issue
8 msgcreating an xls file from mysql data
2 msgHelp with a foreach statement
5 msgCan I make EasyPHP on Windows allow remote conn...
3 msgSafe mode story

PHP-MYSQL Error: Can't connect to MySQL socket....
\ Rahul (11 May 2008)
. \ Rahul (11 May 2008)
. \ Nathan Nobbe (11 May 2008)
. . \ Rahul (11 May 2008)
. . . \ Nathan Nobbe (11 May 2008)
. . . \ Rahul (11 May 2008)
. . . . \ Nathan Nobbe (11 May 2008)
. . . . . \ Rahul P (11 May 2008)
. . . . . . \ Nathan Nobbe (11 May 2008)
. . . . . . . \ Rahul P (11 May 2008)
. . . . . . . . \ Nathan Nobbe (11 May 2008)
. . . . . . . . . \ Rahul P (11 May 2008)
. . . . . . . . . . \ Rahul P (11 May 2008)
. . . . . . . . . . . \ Nathan Nobbe (11 May 2008)
. . . . . . . . . . . . \ Rahul P (11 May 2008)
. . . . . . . . . . . . . \ Nathan Nobbe (11 May 2008)
. . . . . . . . . . . \ Shawn McKenzie (11 May 2008)
. . . . . . . . . . . \ Shawn McKenzie (11 May 2008)

Subject:PHP-MYSQL Error: Can't connect to MySQL socket. Can someone help me out please?
Group:Php-general
From:Rahul
Date:11 May 2008


 
I am using Fedora Core 4. As I was unable to use PHP or MySQL together,
I uninstalled both of them and installed again using the following commands:

yum install mysql

And then

apt-get install php php-devel php-gd php-imap php-ldap php-mysql
php-odbc php-pear php-xml php-xmlrpc curl curl-devel perl-libwww-perl
ImageMagick

And then started the mysql server.

I am able to connect to the server from the console my typing

mysql -h <hostname> -u root -p <mypass>

However, when I try to connect to mysql through PHP I get the following
errors:

PHP Warning: mysql_query(): Can't connect to local MySQL server through
socket '/var/lib/mysql/mysql.sock' (2) in
/export/home/rahul/may/sample.php on line 5
PHP Warning: mysql_query(): A link to the server could not be
established in /export/home/rahul/may/sample.php on line 5
Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock' (2)

Can someone please help me out?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



© 2004-2008 readlist.com