sudo /etc/init.d/mysql stop
sudo mysqld_safe --skip-grant-tables &
mysql -u root
MariaDB [(none)]> use mysql;
MariaDB [mysql]> UPDATE user SET password=PASSWORD("new_password") WHERE User='root';
MariaDB [mysql]> FLUSH PRIVILEGES;
MariaDB [mysql]> quit;
mysqladmin shutdown
#sudo service mysql stop
#sudo service mysql start
Last active
May 15, 2019 17:36
-
-
Save xemoe/d1b14f73874f7cdc661fa7de1dae1221 to your computer and use it in GitHub Desktop.
Reset mariadb root password
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment