Les quick dirty MySQL password hack

The bread and butter “root” password reset procedure for those times when you are in need:


/etc/init.d/mysql stop
mysqld_safe --skip-grant-tables &
update user set password=PASSWORD("PASSWORD") where user='root';
flush privileges;

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s