Reset mysql/mariadb root password

in the ENV's of the statefulset:

MARDIADB_EXTRA_FLAGS='--skip-grant-tables'
ALLOW_EMPTY_PASSWORD='yes'

After this you can login through the container with mysql -u root, there should be no password.

You can then execute:

 ALTER USER root@'%' IDENTIFIED VIA mysql_native_password USING PASSWORD("new_password_here");
 FLUSH PRIVILEGES;
Update the secret or ENV if needed.

Once done remove the env's and restart the pod.