468,293 Members | 1,867 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,293 developers. It's quick & easy.

Warning: mysql_connect(): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /home/custcare/dbconn.inc on line 2

Neo
It's really strange. I downloaded the latest 4.0.16 RPM from mysql.com
and installed it to my Fedora system, and did *not* do anything else
(Actually I am completely new to mysql).

I wrote a test php script to test mysql (ftp_connect('localhost',
'root');), but got the following error:

Warning: mysql_connect(): Can't connect to local MySQL server through
socket '/tmp/mysql.sock' (2) in /home/custcare/dbconn.inc on line 2

I ran phpBB2 installation page, got the same error. But it can connect
to mysql using my computer name. Anyone can help???
Jul 17 '05 #1
3 11438
On Mon, 12 Apr 2004 07:06:56 -0700, Neo wrote:
It's really strange. I downloaded the latest 4.0.16 RPM from mysql.com
and installed it to my Fedora system, and did *not* do anything else
(Actually I am completely new to mysql). [..] I ran phpBB2 installation page, got the same error. But it can connect
to mysql using my computer name. Anyone can help???


ps aux | grep mysql

If mysqld's not running; start it...!

root@localhost root]# /etc/init.d/mysql start

--
mvh/regards
Joachim Mæland

If everything seems under control, you're just not going fast enough.
-Mario Andretti

Jul 17 '05 #2

"Joachim Mæland" <jm*****@profine.net> wrote in message
news:pa****************************@profine.net...
On Mon, 12 Apr 2004 07:06:56 -0700, Neo wrote:
It's really strange. I downloaded the latest 4.0.16 RPM from mysql.com
and installed it to my Fedora system, and did *not* do anything else
(Actually I am completely new to mysql).

[..]
I ran phpBB2 installation page, got the same error. But it can connect
to mysql using my computer name. Anyone can help???


ps aux | grep mysql

If mysqld's not running; start it...!

root@localhost root]# /etc/init.d/mysql start


Yipe! safe_mysqld, please...

Base problem, it's not PHP that's causing the difficulty, MySQL isn't
running a server. Get a command line MySQL client session going first.

Garp
Jul 17 '05 #3
Neo
ne***********@msn.com (Neo) wrote in message news:<96**************************@posting.google. com>...
It's really strange. I downloaded the latest 4.0.16 RPM from mysql.com
and installed it to my Fedora system, and did *not* do anything else
(Actually I am completely new to mysql).

I wrote a test php script to test mysql (ftp_connect('localhost',
'root');), but got the following error:

Warning: mysql_connect(): Can't connect to local MySQL server through
socket '/tmp/mysql.sock' (2) in /home/custcare/dbconn.inc on line 2

I ran phpBB2 installation page, got the same error. But it can connect
to mysql using my computer name. Anyone can help???


Okay, Thanks for replies. But I have found out the solution myself. It
seems that the RPM setup package did not create the socket file in
/tmp. I did:

ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock

and all is fine now.
Jul 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Bill Hernandez | last post: by
6 posts views Thread by scottyman | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by Teichintx | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.