Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Resetting MySQL root password

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hello,

How can we reset the forgotten root password?
Can we change PRIVILEGES of a mysql user other than by root
 
The second question I won't touch.
To the first question:

Do you have root to the machine?
If so... When this happened to me I (no one told me mysql root when they left *sob*) I did a google for the same problem & found this...
1) Shut down the mysqld
2) Restarted mysqld with the --skip-grant-tables option
3) logged into mysql as root w/o password
$ mysql -u root mysql
4) did the following:
mysql> UPDATE user SET Password=PASSWORD('mynewpassword') WHERE User='root';
5) flushed the privileges with:
mysql> FLUSH PRIVILEGES;
6) logged out
7) restarted the mysqld

there are other ways
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top