How can I reset root password for MySQL

No specific Bitcoin Bounty has been announced by author. Still, anyone could send Bitcoin Tips to those who provide a good answer.

I have installed MySQL server in Ubuntu 12.04 and I forgot password for user named root.

How I can reset password for this user?


1 Answer - total earned - 0 BTC ($0 USD)

Everyone, even non-registered users could send Bitcoin Tips to YOU if they are inspired by your answer!

Easy steps to reset mySQL root password:

  1. Check the version of mysql-server;

    apt-cache policy mysql-server

    and you will see string like this:

    Installed: 5.5.26-0ubuntu0.12.04

    it means that you have a mysql-server-5.5 installed in your system

  2. Start reconfiguration:

    sudo dpkg-reconfigure mysql-server-5.5 < version of mysql server
  3. Change the password on this screen:

Configuring MySQL Server

  1. Try connect:

    mysql -u root -p

You can read full answer by this link.


Thanks! It helped me :)


Post Answer

Will Bitcoin Tipping become a new Internet Culture?

Please share our story! THANK YOU!