Re: secure automated access (was "Re: Backing up all databases")

2003-11-17 Thread Ed Leafe
On Monday, November 17, 2003, at 11:51 AM, Michael Stassen wrote: I'm glad this worked for you, but now I'm confused. The manual clearly indicates the use of quotes around the password. See . The "typical user option file" starts with [clien

Re: secure automated access (was "Re: Backing up all databases")

2003-11-17 Thread Michael Stassen
Ed Leafe wrote: On Monday, November 17, 2003, at 02:58 AM, Michael Stassen wrote: cat $HOME/.my.cnf [client] password="rootpassword" /usr/local/mysql/bin/mysql --defaults-file=$HOME/.my.cnf ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) Oh. That changes things.

Re: secure automated access (was "Re: Backing up all databases")

2003-11-17 Thread Randall Perry
> >> In the case of root cron jobs then, you need a .my.cnf readable only by >> root in root's home. It should include >> >> [client] >> password="mysql_root_password" > > This is incorrect, unless the double quotes are part of the password. > Removing them so that the entry reads: > > [clien

Re: secure automated access (was "Re: Backing up all databases")

2003-11-17 Thread Randall Perry
>> >> 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 l

Re: secure automated access (was "Re: Backing up all databases")

2003-11-17 Thread Ed Leafe
On Monday, November 17, 2003, at 02:58 AM, Michael Stassen wrote: cat $HOME/.my.cnf [client] password="rootpassword" /usr/local/mysql/bin/mysql --defaults-file=$HOME/.my.cnf ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) Oh. That changes things. The error says "U

Re: secure automated access (was "Re: Backing up all databases")

2003-11-17 Thread Michael Stassen
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 t

Re: secure automated access (was "Re: Backing up all databases")

2003-11-16 Thread Randall Perry
> 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 pa

Re: secure automated access (was "Re: Backing up all databases")

2003-11-13 Thread Michael Stassen
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. When you tried the defaults-file option, did you use the full path? That is, mysql --def

Re: secure automated access (was "Re: Backing up all databases")

2003-11-13 Thread Randall Perry
on 11/13/03 3:57 PM, Michael Stassen at [EMAIL PROTECTED] wrote: > The client (mysql) reads the .my.cnf file when you start it, so > restarting mysqld and relogging in as root are not necessary. > > Let's see if I have this straight: While logged in as root, you created > .my.cnf in root's home d

Re: secure automated access (was "Re: Backing up all databases")

2003-11-13 Thread Michael Stassen
The client (mysql) reads the .my.cnf file when you start it, so restarting mysqld and relogging in as root are not necessary. Let's see if I have this straight: While logged in as root, you created .my.cnf in root's home directory. This file contains the password for the mysql user "root". Ye

Re: secure automated access (was "Re: Backing up all databases")

2003-11-13 Thread Randall Perry
I created the .my.cnf file in root's home dir, added the directives below setting the correct password. Restarted mysqld, re-logged in as root, but nothing works. It's not getting the password. > The simplest solution is to keep the password in the .my.cnf file in > your home directory. See http

Re: secure automated access (was "Re: Backing up all databases")

2003-11-12 Thread Randall Perry
That sounds like the solution. Thanks for your help, everyone. > The simplest solution is to keep the password in the .my.cnf file in > your home directory. See http://www.mysql.com/doc/en/Option_files.html > in the manual. > > In the case of root cron jobs then, you need a .my.cnf readable on

Re: secure automated access (was "Re: Backing up all databases")

2003-11-12 Thread Michael Stassen
The simplest solution is to keep the password in the .my.cnf file in your home directory. See http://www.mysql.com/doc/en/Option_files.html in the manual. In the case of root cron jobs then, you need a .my.cnf readable only by root in root's home. It should include [client] password="mysql_root_p

Re: Backing up all databases

2003-11-12 Thread gerald_clark
Then put it in root's .my.cnf file. Randall Perry wrote: Well, this command is running in a cron job -- so that's not an option. Be aware that you password is visible (unix anyway with a "ps -ef"..) when you pass the password like -ppassword. Usually you can enter the password later if you u

Re: secure automated access (was "Re: Backing up all databases")

2003-11-12 Thread David T-G
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dan, et al -- ...and then Dan Greene said... % % you could put a shell script as the actual cron job, and make the file only read-able by root, using an environment variable as the password passed (defined in shell script file), so that way even if

RE: Backing up all databases

2003-11-12 Thread Dan Greene
ssword (if they happen to catch the setting of the env var that's another story, but _much_ less likely) > -Original Message- > From: Randall Perry [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 12, 2003 9:10 AM > To: Cormac Tiernan > Cc: [EMAIL PROTE

Re: Backing up all databases

2003-11-12 Thread Randall Perry
Well, this command is running in a cron job -- so that's not an option. > > Be aware that you password is visible (unix anyway with a "ps -ef"..) when you > pass the password like -ppassword. Usually you can enter the password later > if > you use > usr/local/mysql/bin/mysqldump --opt --all-da

Re: Backing up all databases

2003-11-12 Thread Cormac Tiernan
Be aware that you password is visible (unix anyway with a "ps -ef"..) when you pass the password like -ppassword. Usually you can enter the password later if you use usr/local/mysql/bin/mysqldump --opt --all-databases -p which avoids the password being visible.. Cormac. On 12-Nov-2003 Randall

Re: Backing up all databases

2003-11-12 Thread Randall Perry
Ok, I was confused about the password thing. It works now that I'm passing root's password in the command: /usr/local/mysql/bin/mysqldump --opt --all-databases -prootpassword > /usr/local/mysql/data/mysqldump > You're joking, right? (Perhaps you thought the original question was a > joke, too, a

Re: Backing up all databases

2003-11-11 Thread Michael Stassen
You're joking, right? (Perhaps you thought the original question was a joke, too, as root normally has access to all dbs?) As I understand the manual , that will give root access to every db, from every host except localhost, with no password! I can't i

RE: Backing up all databases

2003-11-11 Thread Dathan Vance Pattishall
Look at GRANT on mysql.com GRANT ALL PRIVILEGES ON *.* TO root@'%' IDENTIFITED BY ''; - Dathan Vance Pattishall   - Sr. Programmer and mySQL DBA for FriendFinder Inc.   - http://friendfinder.com/go/p40688 -->-Original Message- -->From: Randall Perry [mailto:[EMAIL PROTECTED] -->Sent: T