1

I do not care to gain access to any database data, I simply want to reset the root password for the MySQL server on an ubuntu 14.04 LTS vm that I am using for development and testing.

Several places I have read that dpkg-reconfigure will prompt for a new MySQL root password, but it does not. Nor does uninstalling and reinstalling mysql-server.

I tried uninstalling and zapping the configuration folder /etc/mysql, and that also had no effect.

It must have prompted me when I ran the installer and now I've forgotten what I entered.

Warren P
  • 204

1 Answers1

2

Easiest method (as the Ubuntu Wiki suggests):

sudo dpkg-reconfigure mysql-server-N.N

replace N.N with the version of MySql.

Ron
  • 20,638
  • As I stated already, I have read that dpkg-reconfigure will prompt for a new MySQL root password, but it does not. I ran that command (5.6 was the version I think). It had no effect and there was no prompt – Warren P May 11 '15 at 16:14
  • did you try the other ('not-really-hard') options mentioned in the link? – Ron May 11 '15 at 16:15
  • Alternative UPDATE user SET Password = PASSWORD('newpwd') worked – Warren P May 11 '15 at 21:36