Reputation: 6080
Unable to reset mysql password for my Ubuntu machine. I followed the instruction below.
https://help.ubuntu.com/community/MysqlPasswordReset
But I get the following error
sudo /usr/sbin/mysqld --skip-grant-tables --skip-networking
151109 20:04:43 [Note] /usr/sbin/mysqld (mysqld 5.5.45) starting as process 18720 ...
151109 20:04:43 [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!
151109 20:04:43 [ERROR] Aborting
151109 20:04:43 [Note] /usr/sbin/mysqld: Shutdown complete
Upvotes: 3
Views: 668
Reputation: 5326
Try:
sudo /usr/sbin/mysqld --skip-grant-tables --skip-networking --user=mysql
Upvotes: 4
Reputation: 34657
Perhaps this page might be of use. I copy-pasted the snippet for generic systems, as you didn't indicate whether you are using Unix or Windows:
mysql
FLUSH PRIVILEGES;
Now you can change the root password like any other user, e.g. using set password
or alter user
.
Hope that helps...
Upvotes: 2