Setting and changing passwords

To change the password of a user or to set a password for a user that doesn't have one, we can use the GRANT statement, but that implies that we are adding permissions to a user. To change or set a password without changing any permissions; it's much easier to use the SET PASSWORD statement. It has the following pattern:

SET PASSWORD FOR <user> = PASSWORD('<password>'),

The following is an example of this:

SET PASSWORD FOR 'henry'@'%' = PASSWORD('niftypassword'),

Note

Complete documentation of the SET PASSWORD statement is available at the following location:

https://mariadb.com/kb/en/set-password/

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.224.44.53