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.
Easy steps to reset mySQL root password:
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
Start reconfiguration:
sudo dpkg-reconfigure mysql-server-5.5 < version of mysql server
Change the password on this screen:
Try connect:
mysql -u root -p
You can read full answer by this link.
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!