Oracle 5.0 Reference Manual page 1181

Table of Contents

Advertisement

removes privileges, but does not drop
REVOKE
entirely, use
If the grant tables hold privilege rows that contain mixed-case database or table names and the
lower_case_table_names
to revoke these privileges. It will be necessary to manipulate the grant tables directly.
create such rows when
created prior to setting the variable.)
When successfully executed from the
affected. To determine what privileges result from the operation, use
rows
Section 13.7.5.17,
13.7.1.6.
SET PASSWORD
SET PASSWORD [FOR user] =
{
PASSWORD('cleartext
|
OLD_PASSWORD('cleartext
|
'encrypted
}
The
SET PASSWORD
enabling the
If the password is specified using the
cleartext (unencrypted) password should be given as the argument to the function, which hashes
the password and returns the encrypted password string. If the password is specified without using
either function, it should be the already encrypted password value as a literal string. In all cases, the
encrypted password string must be in the format required by the authentication method used for the
account.
With no
FOR user
account the server authenticated you as, invoke the
successfully connects to the server using a nonanonymous account can change the password for that
account.
With a
FOR user
the
UPDATE
described in
'user_name'@'host_name', where
and
User
Host
of
is used.) For example, to set the password for an account with
'%'
of
and '%.example.org', write the statement like this:
'bob'
SET PASSWORD FOR 'bob'@'%.example.org' =
That is equivalent to the following statements:
UPDATE mysql.user SET
WHERE User='bob' AND Host='%.example.org';
FLUSH PRIVILEGES;
Another way to set the password is to use GRANT:
GRANT USAGE ON *.* TO 'bob'@'%.example.org' IDENTIFIED BY
The
old_passwords
PASSWORD()
password as not being in the correct format, it may be necessary to set
change the hashing method. For descriptions of the permitted values, see
System
Variables".
Account Management Statements
(see
Section 13.7.1.2,
DROP USER
[466]
lower_case_table_names
"SHOW GRANTS
Syntax".
Syntax
password')
password')
password'
statement assigns a password to an existing MySQL user account. In MySQL 5.0,
[488]
system variable does not prevent use of
read_only
clause, this statement sets the password for the current user. (To see which
clause, this statement sets the password for the named user. You must have
privilege for the
mysql
Section 6.2.3, "Specifying Account
columns of the
mysql.user
Password=PASSWORD('cleartext
[480]
system variable value determines the hashing method used by
[956]. If you specify the password using that function and
mysql.user
"DROP USER
system variable is set to a nonzero value,
[466]
program,
mysql
REVOKE
[956]
or
PASSWORD()
CURRENT_USER()
database to do this. The user account name uses the format
Names". The
and
'user_name'
table row. (If you specify only a user name, a host name
PASSWORD('cleartext
password')
1161
table entries. To remove a user account
Syntax") or DELETE.
REVOKE
is set, but such rows might have been
responds with
Query OK, 0
SHOW
SET
PASSWORD.
[956]
OLD_PASSWORD()
[959]
function.) Any client who
value should be given as
user
are exactly as listed in the
'host_name'
and
User
Host
password');
'cleartext
password';
SET PASSWORD
old_passwords
Section 5.1.4, "Server
cannot be used
(GRANT
will not
GRANTS. See
function, the
column values
rejects the
[480]
to

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents