how to reset mariadb root password - jigneshpshah/greycube_helpmanual GitHub Wiki

https://www.digitalocean.com/community/tutorials/how-to-reset-your-mysql-or-mariadb-root-password

sudo systemctl stop mariadb
sudo mysqld_safe --skip-grant-tables --skip-networking &
mysql -u root
FLUSH PRIVILEGES;
ALTER USER 'root'@'localhost' IDENTIFIED BY 'new_password';
sudo kill `cat /var/run/mysqld/mysqld.pid`