Skip to content

Instantly share code, notes, and snippets.

@maciakl
Created January 23, 2012 18:32
Show Gist options
  • Save maciakl/1664704 to your computer and use it in GitHub Desktop.
Save maciakl/1664704 to your computer and use it in GitHub Desktop.
Reset MySQL Password on Ubuntu
# Stop MySQL
sudo /etc/init.d/mysql stop
# Start MySQL skipping checks
sudo mysqld --skip-grant-tables &
# Log in as root
mysql -u root mysql
# Reset password
UPDATE user SET password=PASSWORD('NEWPASSWORD') WHERE user='root';
FLUSH PRIVILEGES;
exit;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment