List:General Discussion« Previous MessageNext Message »
From:Monika Plawna Date:March 21 2000 4:26pm
Subject:Re: Error 2002 (Can't connect to local MySQL server through socket
'/tmp/mysql.sock' (2))
View as plain text  
<snip>

> It sounds like the HP-UX password reading function acts like the one
> on Solaris,
> in that it reads from the standard input rather than from the terminal.  You
> should be able to get around this by creating a .my.cnf file in your home
> directory with the password in it:
>
> [client]
> password=your-password
>

I created a file in my home directory called .my.cnf and assuming my password was
secret, here's what I have in it:
[client]
password=secret

This didn't help with the problem, though. It doesn't seem like the file is being
used (ie. there are too many stars being displayed for the password), although if
I put anything else in the file I get this error:

error: Found option without preceding group in config file:
/opt/1/u1/plawna/.my.cnf at line: 1
Program aborted

should I replace the word "client" with the client name? I'm not sure if I missed
something...
I can log in manually using the name and password...

Thank you for your time!

Monika


>
> Make sure to change the file to mode 600 after creating it.
>
> >It worked properly before! Same thing happens when I try to run all the other
> >scripts.
> >
> >I'm tempted to re-install everything...
> >How do I un-install, or should I just overwrite all the files?
>
> That may not be necessary.
>
> >
> >Thanks again!
> >
> >Monika
> >
> >sasha@stripped wrote:
> >
> >>  Monika Plawna wrote:
> >>  >
> >>  > Hi all,
> >>  >
> >>  > Yes, I'm a newbie, and yes, I know you will want to refer me to the
> >>  > manual, but please hear me out. I've already tried that.
> >>  >
> >>  > I installed mysql 3.22.32 on HP-UX 10.2 as well as the DBI-1.13,
> >>  > Data-Dumper-2.09, Msql-Mysql-modules-1.2018
> >>  > I also got Paul DuBois' book.
> >>  >
> >>  > I setup a user on the samp_db by the name of monika, I gave her a
> >>  > password and I tried running a script from Paul's book (I changed the
> >>  > user name and password), dump_members.
> >>  > I got the following error:
> >>  >
> >>  > Error 2002 (Can't connect to local MySQL server through socket
> >>  > '/tmp/mysql.sock' (2))
> >>  >
> >>  > So I did the sensible thing and searched the list, but I found
> everyone
> >>  > who asked about this was referred to the manual. So I've tried that.
> >>  > I went through the section, trying every single suggestion - but they
> >>  > all work! Here's the what I was able to execute:
> >>  >
> >>  > ps -ef | grep mysql
> >>  > mysqladmin version
> >>  > mysqladmin variables
> >>  > mysqladmin -h `hostname` version variables
> >>  > mysqladmin -h `hostname` --port=3306 version
> >>  > mysqladmin -h <ip of my machine>' version
> >>  > mysqladmin --socket=/tmp/mysql.sock version
> >>  >
> >>  > I also tried    telnet <my host> 3306 and it worked too!   I got
> the
> >>  > version number, and then the following message
> >>  > Bad handshakeConnection closed by foreign host.
> >>  >
> >>  > The only thing I'm not sure about is, I checked /tmp and I didn't
> find
> >>  > mysql.sock.  I don't know if it has to show up, but it didn't.
> However,
> >>  > as I mentioned above, all the commands work, and if I tried to
> connect
> >>  > using mysql -u monika -p samp_db it works like a charm.
> >>  > Please help!
> >>  >
> >>  > Monika
> >>  >
> >>  > --
> >>
> >>  Looks like your socket file is somewhere else and your Perl client
> >>does not know
> >>  it. The easiest way to fix the problem would be:
> >>
> >>  mysqladmin variables | grep sock
> >>
> >>  find out where your socket file is and then symlink
> >>/tmp/mysql.sock to point to
> >>  the real location of the socket.
> >>
> >>  There might be a more civilized what to convince Perl DBI to look
> >>in the right
> >>  location for the socket, but I don't know how to do it off the top
> >>of my head
> >>  without reading the docs ...
> >>
> >>  --
> >>  Sasha Pachev
> >>
> >>  +------------------------------------------------------------------+
> >>  | TcX  ____  __     _____   _____  ___     ==  mysql@stripped        |
> >>  |     /*/\*\/\*\   /*/ \*\ /*/ \*\ |*|     Sasha Pachev            |
> >>  |    /*/ /*/ /*/   \*\_   |*|   |*||*|     mailto:sasha@stripped  |
> >>  |   /*/ /*/ /*/\*\/*/  \*\|*|   |*||*|     Provo, Utah, USA        |
> >>  |  /*/     /*/  /*/\*\_/*/ \*\_/*/ |*|____                         |
> >>  |  ^^^^^^^^^^^^/*/^^^^^^^^^^^\*\^^^^^^^^^^^                        |
> >>  |             /*/             \*\ Developers Team                  |
> >>  +------------------------------------------------------------------+
>
> --
> Paul DuBois, paul@stripped
>
> --
> ---------------------------------------------------------------------
> Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
> posting. To request this thread, e-mail mysql-thread31746@stripped
>
> To unsubscribe, send a message to:
>     <mysql-unsubscribe-plawna=nortelnetworks.com@stripped>

--

Monika Plawna
Service Builder Lab Support
ESN 395-5257     (613) 765-5257


Thread
Error 2002 (Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2))Monika Plawna20 Mar
  • Re: Error 2002 (Can't connect to local MySQL server throughsocket '/tmp/mysql.sock' (2))Paul DuBois20 Mar
  • Re: Error 2002 (Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2))sasha20 Mar
  • Re: Error 2002 (Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2))Monika Plawna21 Mar
    • Re: Error 2002 (Can't connect to local MySQL server throughsocket '/tmp/mysql.sock' (2))Paul DuBois21 Mar
  • Re: Error 2002 (Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2))sasha21 Mar
  • Re: Error 2002 (Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2))Monika Plawna21 Mar
    • Re: Error 2002 (Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2))sinisa21 Mar
    • Re: Error 2002 (Can't connect to local MySQL server throughsocket '/tmp/mysql.sock' (2))Paul DuBois21 Mar
  • Re: Error 2002 (Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2))Monika Plawna22 Mar