How to reset mysql root password in RedHat
My friend posted about reseting mysql root password long time ago. It still works but you have to know how to change root password properly. Since I have to do it by myself, I will explain more detail in this post.
- Add
skip-grant-tables
in section[mysqld]
in/etc/my.cnf
- Restart mysqld by
service mysqld restart
-
Change password using below query.
update mysql.user set password=password('new password') where user='root';
-
Remove
skip-grant-tables
from/etc/my.cnf
- Restart mysqld again
Tags: mysql, root password
- sugree's blog
- 1577 reads
Recent comments
2 years 11 weeks ago
2 years 15 weeks ago
2 years 16 weeks ago
2 years 16 weeks ago
2 years 17 weeks ago
2 years 19 weeks ago
2 years 19 weeks ago
2 years 19 weeks ago
2 years 19 weeks ago
2 years 20 weeks ago