473,468 Members | 1,506 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Can't connect error 2002


This is a bit of a newbie question --

I've just installed MySQL 4.1.13 on a Fedora core 3 system. It
installed great. It wasn't hard to get it running and create a
few databases. But I can't seem to make the client shell run
from anywhere but the mysql/bin directory. I've placed the
/usr/local/mysql/bin directory in my PATH, but I still have
to change to this directory to make the MySQL shell to work.
If I'm try to run it from any other directory I get this
error:

ERROR 2002 (HY000): Can't connect to local MySQL server
through socket '/var/lib/mysql/mysql.sock' (2)

What sleight of hand to do I need to do the get the MySQL
client to run no matter where on the machine the calling
process is? Since I'll need to do this to get my web server
to use MySQL.

Thanks in advance.

B Squared
Aug 25 '05 #1
2 31253
You need to update your 'my.ini' file to the path you have it installed
too.

The my.ini file should be in the root directory of your OS.

Similar to this;

[mysqld]
basedir=C:/mysql
datadir=C:/mysql/data

"B Squared" <nu**@null.com> wrote in message
news:yp********************@scnresearch.com...

This is a bit of a newbie question --

I've just installed MySQL 4.1.13 on a Fedora core 3 system. It
installed great. It wasn't hard to get it running and create a
few databases. But I can't seem to make the client shell run
from anywhere but the mysql/bin directory. I've placed the
/usr/local/mysql/bin directory in my PATH, but I still have
to change to this directory to make the MySQL shell to work.
If I'm try to run it from any other directory I get this
error:

ERROR 2002 (HY000): Can't connect to local MySQL server
through socket '/var/lib/mysql/mysql.sock' (2)

What sleight of hand to do I need to do the get the MySQL
client to run no matter where on the machine the calling
process is? Since I'll need to do this to get my web server
to use MySQL.

Thanks in advance.

B Squared

Aug 25 '05 #2
badvel
1 New Member
I am very new to mysql. I ran into similar problem.
***Problem ****
76 prompt > mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13)

***Resolution***
Please check the permissions on /var/lib/mysql.

Nobody had r-x permissons except the owner. I changed the permissions to 755 and now it works.
*It worked with out my.ini or .my.ini file.

Hope it helps, if the problem is still not resolved.
Sep 15 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

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: Matthew Robinson | last post by:
i get this when i do '/etc/rc.d/rc.mysql start' ERROR 2002: Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (2) ive had a look on google, and the problem for...
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...
1
by: jiing | last post by:
Now let me describe what I have done and my purpose: Originally, I want to user ports to install phpBB But I found that phpBB doesn't support mysql 5.x (but the ports installed mySQL 5.0.0...
18
by: Jen | last post by:
I'm using Microsoft's own VB.NET FTP Example: http://support.microsoft.com/default.aspx?scid=kb;en-us;832679 I can get the program to create directories, change directories, etc., but I can't...
2
by: Moises | last post by:
Hi, I just installed MySQL using "yum install mysql" and when I try to run it I get this error: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'...
6
by: markodilore | last post by:
Hey Guys, you helped me once when I tryied to create a database : "Access denied for user ''@'localhost' ". On my Mac OS 10.4, I had no problem creating database and modifying it from the terminal....
1
by: sasimca007 | last post by:
Hi friends, I installed mysql in ubuntu but, i don't know how to connect to that mysql. Actually we connect to postgresql by psql command, but when i tried to connect mysql with...
18
by: AngelinaB | last post by:
It's my first time learn hosting for my final assignment i got this error Fatal error: Uncaught exception 'Zend_Db_Adapter_Exception' with message 'SQLSTATE Can't connect to local MySQL server...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.