At 11:17 +1000 7/8/04, Ian Holsman wrote:
Hi.

an OPS$ account in oracle lets a given user log in automatically to a OPS$<user-id> account from the local machine without a password.
but not from another user-id on the same machine.



ie

[EMAIL PROTECTED] $ mysql -u ianh
would work
but
[EMAIL PROTECTED] $ mysql -u ianh
would not.

Does mysql have this functionality?

If I understand you correctly, no. If an account for a given user on a machine has no password, anyone on that machine can use it. (When you connect to the MySQL server, you specify a username. Anyone could specify the username of the account with no password.)

Perhaps an acceptable alternative would be to do this:

- Assign the account a password.  (All MySQL accounts really should have a
password anyway.
_ For the user that you want to be able to connect "automatically", create
a ~/.my.cnf option file that lists the password in the [client] section:

[client]
password=pass-for-account

Make the file readable only by that user.

Now when the user runs a MySQL client program, it'll pick up the password
from the option file automatically and the user won't have to type it in.
If the goal is for the user not to have to type passwords, this procedure
would achieve that, and it wouldn't leave the account passwordless.

http://dev.mysql.com/doc/mysql/en/Using_MySQL_Programs.html
http://dev.mysql.com/doc/mysql/en/Option_files.html
http://dev.mysql.com/doc/mysql/en/Connecting.html

--
Paul DuBois, MySQL Documentation Team
Madison, Wisconsin, USA
MySQL AB, www.mysql.com

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



Reply via email to