How can I reset root password for MySQL

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

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?

Thanks.

1 Answer

1
=
0
=
$0
Internet users could send Bitcoin Tips to you if they like 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.


SEND BITCOIN TIPS
User rating:

Thanks! It helped me :)

0

Too many commands? Learning new syntax?

FavScripts.com is a free tool to save your favorite scripts and commands, then quickly find and copy-paste your commands with just few clicks.

Boost your productivity with FavScripts.com!

Post Answer