MariaDB change user password

  • Last update: Apr 3, 2024
  • Views: 35
  • Author: Admin
MariaDB change user password

Hello colleagues.

In today's article, I will tell you how to change your account password. MariaDB has two ways to do this, with the ALTER USER construct and with the PASSWORD() function. We will consider both options.

The article will be very short.

 

Article content:

  1. Change password with ALTER USER.
  2. Changing the password using the PASSWORD() function.
  3. Total.

 

1. Change password with ALTER USER.

mariadb> ALTER USER 'maks'@'localhost' identified by 'JSOSD*S&d83u423';

mariadb_set_password


 

2. Changing the password using the PASSWORD() function.

mariadb> SET PASSWORD FOR 'maks'@'localhost' = PASSWORD('JSOSD*S&d83u423');

mariadb_set_password


 

3. Total.

There is no difference in these options, you can use the method that you like best.


 

Thank you all, I hope my article was of some help to you.

SIMILAR ARTICLES