Skip to content

Instantly share code, notes, and snippets.

@aarsla
Created January 23, 2018 22:55
Show Gist options
  • Save aarsla/d37621a92b797e53aff38fd7913518a2 to your computer and use it in GitHub Desktop.
Save aarsla/d37621a92b797e53aff38fd7913518a2 to your computer and use it in GitHub Desktop.
MariaDB reset root password
sudo /etc/init.d/mysql stop
sudo mysqld_safe --skip-grant-tables --skip-networking &
FLUSH PRIVILEGES;
USE mysql;
UPDATE user SET plugin="";
UPDATE user SET password=PASSWORD('MyNewPass') WHERE User='root' AND Host = 'localhost';
FLUSH PRIVILEGES;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment