473,406 Members | 2,220 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

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 12646
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: dsclements | last post by:
>Description: I'm running mysql in a 3 server configuration, with 2 servers being slaves to the first. I'm running vpopmail, which means a connection every incoming mail and every check. I woke up...
0
by: Bill Hernandez | last post by:
Hi, I've been writing software on the mac since 1987, but am brand new at unix/php/mysql, and that's where I'm headed so I'm reading everything I can get my hands on, but like anything else...
0
by: Ian | last post by:
Dear All, I just downloaded & installed MYSQL. It seemed to work and I can start it and enter my password and change a directory but that is about all. I have been ready and playing "hit & miss"...
3
by: Pugi! | last post by:
On a freshly installed Fedora C3 (incl. webserver apache php mysql) i get the following problem when connecting to mysql through a browser (phpMyAdmin): : #2002 Can't connect to local MySQL...
2
by: Brett B | last post by:
I just installed mysql on linux. If I open a terminal, su to root, then type "mysql", I am able to connect to the server and run my queries. If I exit out of su so that I am my own id (baisley)...
1
by: linux | last post by:
Sorry if this is a really dumb question. I am trying to connect to our remote MySQL server (which is running just fine). I have a perl script which worked just fine on my other Fedora 4 box (all...
6
by: scottyman | last post by:
I can't make this script work properly. I've gone as far as I can with it and the rest is out of my ability. I can do some html editing but I'm lost in the Java world. The script at the bottom of...
2
by: Michal Stankoviansky | last post by:
Hi Environment: some version of Slackware, Apache 2.2.x, PHP 5.1.5, MySQL 5.0.24. The issue: I'm using Zend Framework Zend_Db component (which uses PDO). We have 2 mysql socket related...
6
by: Christian | last post by:
Hi, Trying to connect to the MySQL server I get the classic error message ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) I have...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.