Home > Archive > MySQL ODBC Connector > September 2005 > problem with mysql.sock









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author problem with mysql.sock
Sandhya Reddy

2005-09-27, 3:23 am

Hello,
I have recently installed FC3 and now I have
PHP(4.4.9) and MYSQL(3.23) which got installed along
with FC3.
I'm able to connect to MYSQL from command prompt.
But the problem fires when I do the same from a PHP
script. The error I get is "Can't connect to local
MySQL server through socket
'/var/lib/mysql/mysql.sock' (13)".
And I'm sure that MYSQL server is running and able tp
connect from command prompt.



I have been searching on the net for the same from the
last 3 days but ended with nothing.



I have changed php.ini to include the
mysql_default_socket
=/var/lib/mysql/mysql.sock.



even then it doen't work.

Earlier I had FC1 and everthing was working fine!



Could please suggest me a solution to tackle this
problem.

Thanks in Advance
Sandhya




____________________
______________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql? unsub...sie.nctu.edu.tw

Logan, David

2005-09-27, 3:23 am

Hi Sandhya,

Have you checked the permissions? The error message is System error: 13
=3D Permission denied. Is your PHP/Apache user able to connect via the
socket? Try connecting as=20

$ su <php/apache user> -c "mysql -u <user you connect with> -p"=20

and see what happens.

Regards=20


David Logan
Database Administrator
HP Managed Services
148 Frome Street,
Adelaide 5000
Australia

+61 8 8408 4273 - Work
+61 417 268 665 - Mobile
+61 8 8408 4259 - Fax


-----Original Message-----
From: Sandhya Reddy & #91;mailto:sandhya_r
evuri@yahoo.co.in]=20
Sent: Tuesday, 27 September 2005 4:03 PM
To: mysql@lists.mysql.com
Subject: problem with mysql.sock

Hello,
I have recently installed FC3 and now I have
PHP(4.4.9) and MYSQL(3.23) which got installed along
with FC3.=20
I'm able to connect to MYSQL from command prompt.=20
But the problem fires when I do the same from a PHP
script. The error I get is "Can't connect to local
MySQL server through socket
'/var/lib/mysql/mysql.sock' (13)".
And I'm sure that MYSQL server is running and able tp
connect from command prompt.
=20
=20
=20
I have been searching on the net for the same from the
last 3 days but ended with nothing.=20
=20
=20
=20
I have changed php.ini to include the
mysql_default_socket
=3D/var/lib/mysql/mysql.sock.
=20
=20
=20
even then it doen't work.

Earlier I had FC1 and everthing was working fine!
=20
=20
=20
Could please suggest me a solution to tackle this
problem.

Thanks in Advance
Sandhya



=09
____________________
______________=20
Yahoo! Mail - PC Magazine Editors' Choice 2005=20
http://mail.yahoo.com

--=20
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: =
http://lists.mysql.com/mysql?unsub=3Ddavid.logan@hp.com


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql? unsub...sie.nctu.edu.tw

Ed Curtis

2005-09-27, 9:23 am


I could be wrong but this may have something to do with ownership and
permissions of the socket file. I recently upgraded my MySQL version and
had basically the same problem. I can't remember though if I had to change
the ownership to root.root or mysql.mysql.

HTH,

Ed


On Mon, 26 Sep 2005, Sandhya Reddy wrote:

> Hello,
> I have recently installed FC3 and now I have
> PHP(4.4.9) and MYSQL(3.23) which got installed along
> with FC3.
> I'm able to connect to MYSQL from command prompt.
> But the problem fires when I do the same from a PHP
> script. The error I get is "Can't connect to local
> MySQL server through socket
> '/var/lib/mysql/mysql.sock' (13)".
> And I'm sure that MYSQL server is running and able tp
> connect from command prompt.
>
>
>
> I have been searching on the net for the same from the
> last 3 days but ended with nothing.
>
>
>
> I have changed php.ini to include the
> mysql_default_socket
=/var/lib/mysql/mysql.sock.
>
>
>
> even then it doen't work.
>
> Earlier I had FC1 and everthing was working fine!
>
>
>
> Could please suggest me a solution to tackle this
> problem.
>
> Thanks in Advance
> Sandhya
>
>
>
>
> ____________________
______________
> Yahoo! Mail - PC Magazine Editors' Choice 2005
> http://mail.yahoo.com
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/mysql?unsub=ed@homes2see.com
>



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql? unsub...sie.nctu.edu.tw

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2009 droptable.com