Translation: set password Statement (submitted to the MariaDB official Manual), passwordmariadb
This article is the official mariadb Manual: the translation of set password.
Original article: https://mariadb.com/kb/en/library/set-password/
Https://mariadb.com/kb/zh-cn/set-password/ I submitted to the MariaDB official manual
Syntax
SET PASSWORD [FOR user] = { PASSWORD('some password') | OLD_PASSWORD('some password') | 'encrypted password' }
Description
SET PASSWORDThe statement is used to assign a password to an existing MariaDB user.
If the password isPASSWORD()
Function orOLD_PASSWORD()
If the function is specified, the plaintext characters to be encrypted must be specified. If the password is not specified using any function, the given password value must be encrypted, as shown inPASSWORD()
Returns the same value.
OLD_PASSWORD()
The function is used only when the MariaDB/MySQL client version is very old (<4.0.0.
If you do not specifyFOR. Any client that uses a non-anonymous account to connect to the server can set a password for its own users.
GivenFORClause, this statement sets the password for the specified user. OnlyMysqlDatabase ownershipUPDATEThe authorized client can perform this operation. The format of the specified user isUser_name @ host_name, WhereUser_nameAndHost_nameYesMysql. userThe User column and Host column of a row in the table.
PASSWORD()
The function returns a 41-character hash value.
PASSWORD()
The parameter section and the password length you want to set for the MariaDB client can be any length.
Example
For exampleMysql. userThe values of the User column and the Host column with one record in the table are'bob'
And'%.loc.gov'
, You can write a statement similar to the following:
SET PASSWORD FOR 'bob'@'%.loc.gov' = PASSWORD('newpass');
Back to Linux series article outline: http://www.cnblogs.com/f-ck-need-u/p/7048359.html
Back to website architecture series article outline: http://www.cnblogs.com/f-ck-need-u/p/7576137.html
Back to database series article outline: http://www.cnblogs.com/f-ck-need-u/p/7586194.html
Reprinted please indicate the source: http://www.cnblogs.com/f-ck-need-u/p/8609777.html
Note: If you think this article is not bad, please click the recommendation in the lower right corner. Your support can stimulate the author's enthusiasm for writing. Thank you very much!