List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:March 21 2000 5:52pm
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...

No, [client] causes the option settings to be used by all the standard clients
so that you don't have to specify them for each one individually.

The error message you show above normally occurs if there is an option setting
that precedes the first [xxxxx]-type line.  Is there such a line in your
file?

Also, when you have your password in an option file, you don't specify -p
or --password on the client command line.  I forgot to mention that, and it
sounds like you're still using one of those options if you're seeing stars.

>
>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.

-- 
Paul DuBois, paul@stripped
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