|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
Re: secure automated access (was "Re: Backing up all databases")
From: Michael Stassen (Michael.Stassen
verizon.net)
Date: Mon Nov 17 2003 - 01:58:23 CST
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Randall Perry wrote:
>
>>Mysterious. I assume `mysql -p` prompts you for root's password and
>>works as expected, since without -p it says you're not using a password,
>>rather than saying there's something wrong with the password.
>>
>
> Yes, that works.
>
>
>>When you tried the defaults-file option, did you use the full path?
>>That is,
>>
>> mysql --defaults-file=/private/var/root/.my.cnf
>>
>
> Yes.
>
>
>>My best guess at this point is that mysql is not finding .my.cnf.
>>Perhaps there's a problem with root's $HOME environment variable? For
>>example, I'm using Mac OS X 10.2.8. Root's $HOME says /var/root, but as
>>/var is a symlink to /private/var, the real home directory is
>>/private/var/root. That's fine, as long as the symlink is there.
>>Without the symlink, I'd get the same thing as you from mysql (and a lot
>>of other stuff wouldn't work).
>>
>
> cat $HOME/.my.cnf
> [client]
> password="rootpassword"
>
> /usr/local/mysql/bin/mysql --defaults-file=$HOME/.my.cnf
> ERROR 1045: Access denied for user: 'root
localhost' (Using password: YES)
Oh. That changes things. The error says "Using password: YES". (You
told me it said "Using password: NO" before). That would indicate that
mysql did read your .my.cnf file, but doesn't believe it contains the
correct password. Double-check you don't have a typo in there. Another
possibility might be a special character such as a " or # in the
password. You can also run
mysql --print-defaults
to see what mysql thinks you are using.
>>If this is not the case, using `cat $HOME/.my.cnf` should give the same
>>result you got using the full path.
>
> Yes
>
>
>>You could also simply `echo $HOME`
>>to see if it's set correctly.
>
> echo $HOME
> /var/root
>
>
>
>>The only other thing I can imagine is that mysql is somehow set to
>>ignore the defaults files. Did you build from source or install one of
>>the packages? Which version mysql? Which OS?
>
> Mac OS 10.2.3. Maybe Panther has an issue with the build?
10.2.3 is Jaguar, not Panther. Did you mean 10.3.x? As I said, I'm
running mysql 4.0.16 on Mac OS 10.2.8, and this works for me. I suppose
an issue with Panther is possible, though I'd be surprised if something
simple like reading .my.cnf were where it showed up.
> /usr/local/mysql/bin/mysql -V
> /usr/local/mysql/bin/mysql Ver 12.21 Distrib 4.0.14, for apple-darwin6.4
> (powerpc)
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]