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

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/

Need help with Linux Server or WordPress? We can help!

Leave a Reply

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