How to reset MySQL root password
As a database administrator, you might forget the root password for your database. It is a serious problem. This tutorial is to teach you how to reset the root password if you forget it.
View Code MYSQL
#Stop the MySQL service. /etc/init.d/mysql stop #Start the MySQL in the safe mode. mysqld_safe --skip-grant-tables & #Login into MySQL as root user mysql -u root #Update the root user password. mysql> use mysql; mysql> update user set password=PASSWORD("NEW PASSWORD") where user='root'; mysql> flush privileges; mysql> quit; Restart the MySQL service & try to login using the new password. /etc/init.d/mysql stop /etc/init.d/mysql start |
3 Comments to “How to reset MySQL root password”
Leave a Reply
it’d be safer to go with
mysqld_safe –skip-grant-tables –skip-networking &
here there is no clear answer for this Question, Please Give me clear Answer.
hey its very Clear thanking you Sir,