<!DOCTYPE markdown>

MySQL / MariaDB - Reset root pasword

# Méthode 1

~~~bashsudo /etc/init.d/mysql stop~~~

~~~bashsudo mysqld_safe --skip-grant-tables &~~~

~~~bashmysql -uroot~~~

~~~sqluse mysql;-- UPDATE user SET authentication_string=PASSWORD(“mynewpassword”) WHERE User='root';UPDATE user SET Password=PASSWORD(“mynewpassword”) WHERE User='root';FLUSH PRIVILEGES;QUIT~~~