Home > Archive > MySQL Server Forum > August 2005 > Can't connect error 2002









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Can't connect error 2002
B Squared

2005-08-24, 8:23 pm


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
Dante

2005-08-25, 9:23 am

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" <null@null.com> wrote in message
news:yp-dne7aGrDFjZDeRVn-vA@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



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2009 droptable.com