By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,086 Members | 1,442 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,086 IT Pros & 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

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a

"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

P: n/a
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.