SET PASSWORD
This page is part of MariaDB's Documentation.
The parent of this page is: SQL Statements for MariaDB Xpand
Topics on this page:
Overview
Defines the password for the given user account.
USAGE
Common Syntax:
SET PASSWORD [FOR <user_name>] = PASSWORD('<new_password>')
DETAILS
This statement changes the password for a database user account.
EXAMPLES
SET PASSWORD
To set a password for the current user account:
SET PASSWORD = PASSWORD('my_new_password');
To set a password for a specific user account:
SET PASSWORD FOR user1 = PASSWORD('user1_new_password');
To set a password for a specific user account at the specific host:
SET PASSWORD FOR 'user1'@'host1'= PASSWORD('user1_new_password');