Change MariaDB user password

To change the MariaDB root password, log in to MySQL as the user root

mysql -u root -p

Enter your current password when prompted.

Use the following command to change the root password

Advertisement

SET PASSWORD FOR 'root'@'localhost' = PASSWORD('NEW_PW_HERE');

Replace NEW_PW_HERE with your new MySQL root password.

Change a user password

SET PASSWORD FOR 'USER_HERE'@'localhost' = PASSWORD('NEW_PW_HERE');

Example

SET PASSWORD FOR 'admin'@'localhost' = PASSWORD('serverok123');

For more info, see

https://mariadb.com/kb/en/set-password
Add a comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Advertisement