Skip to content

Instantly share code, notes, and snippets.

@FabienSalles
Created August 19, 2015 12:21
Show Gist options
  • Save FabienSalles/362c749ec2335dfd091d to your computer and use it in GitHub Desktop.
Save FabienSalles/362c749ec2335dfd091d to your computer and use it in GitHub Desktop.
Reset mysql root password
sudo -i
/etc/init.d/mysql stop
mysqld_safe --skip-grant-tables &
mysql -u root mysql
update user set password=PASSWORD("mdp") where User='root';
flush privileges;
exit;
killall mysqld
/etc/init.d/mysql start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment