469,625 Members | 1,166 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

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 31007
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
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

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