Bruce Dembecki wrote:

On Aug 1, 2005, at 4:58 AM, Nuno Pereira wrote:

Jason Pyeron wrote:

sorry, reply to error here
On Fri, 29 Jul 2005, Nuno Pereira wrote:

Michael Stassen wrote:



You can, but why are you reinventing the wheel? Option files have already been provided for this purpose. In what way is storing the batch user password in 'password_file' better than than storing it in an option file?



Storing in an option file didn't work, so I use this option.

Could you please explain storing in an option file did not work?


I tried to use the "-p=password" option, (replacing password with the right password, of course), but it didn't work. Get it from a file with the options I wrote is my current solution. I don't like to store it in a global option file, but I may consider to use it from an user option file, if that is possible.

Again.. this is the correct way to do it... You can setup a user option file (.my.cnf in the users home directory) and that file should include lines like this:

[client]
user=myUsername
password=myPassword

The user line is optional if the OS username and the MySQL username are the same.

You can protect it by making the user's home directory difficult to get to for other users and giving the file read only permissions for the user in question, and no permissions for other users.

Note the format here - password=myPassword - using -p=password is not the way to pass the information in an option file. The password parameter needs to appear under the [client] tag, or the [mysql] tag if you onyl want it to apply to the mysql command line client and none of the other clients that would read the option file.

Best Regards, Bruce


Note1: I just forwarded to the list, because this could help others.
Note2: PLEASE use the "Reply All" option when replying to the list.

--
Nuno Pereira

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to