Translation: set password Statement (submitted to the MariaDB official Manual), passwordmariadb

Source: Internet
Author: User

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!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.