MySQL install password?
hal at burgiss.net
Sat Jan 10 18:30:31 UTC 2009
On Sat, Jan 10, 2009 at 11:25:10AM -0500, stan wrote:
> /usr/bin/mysql -u root -D mysql -e "update user set
> password=password('new-password') where user='root'"
> But when I try that, it fails, saying I need a passwrd. How can I find out
> what password got set by the installer?
I believe on a default Ubuntu install, you can do the command with
sudo and you are in essence mysql root user. Technically, I believe
the mysql root password is blank (on default Ubuntu). Yes. So just
telling the system you are root, works. Also, doing:
should get you root access at the mysql shell prompt, and from there
you can do whatever else you need to do, including add users, set
So your command probably should have worked fine with sudo on there
(assuming a default Ubuntu install).
More information about the ubuntu-users