This assume you are able to log into your MariaDB or mySQL server or you have configured passwordless authentication and will be using the -e command line option. You may want to first SELECT USER to display the list of current users.
Here is one way to change a users password.
alter user 'john.doe'@'localhost' identified by 'new_password';
And here is another way.
UPDATE mysql.user SET Password=PASSWORD('new_password') WHERE User='the_username'; FLUSH PRIVILEGES;