Reset the root Password on mySQL Server

Just for future notation if you are ever working on a mySQL database server in Fedora (linux) and your want to reset the root password these are the steps to follow:

How to Reset a MySQL Password in 5+1 Easy Steps

  1. Stop the mysqld daemon process.( /etc/init.d/mysqld stop)
  2. Start the mysqld daemon process with the –skip-grant-tables option. (/etc/init.d/mysqld start –skip-grant-tables)
  3. Start the mysql client with the -u root option.( mysql -u root)
  4. Execute the UPDATE mysql.user SET Password=PASSWORD(‘newp@ssw0rd’) WHERE User=’root’;
  5. Execute the FLUSH PRIVILEGES; command.
  6. Exit mySQL server by typing quit

Reference: Tech-FAQ

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