Comments on: Reset MySQL root password without restarting MySQL (no downtime!) https://www.percona.com/blog/reset-mysql-root-password-without-restarting-mysql-no-downtime/ Fri, 12 May 2023 19:38:44 +0000 hourly 1 https://wordpress.org/?v=6.5.2 By: Sander https://www.percona.com/blog/reset-mysql-root-password-without-restarting-mysql-no-downtime/#comment-10967956 Sat, 01 Apr 2017 22:30:13 +0000 https://www.percona.com/blog/?p=27156#comment-10967956 How does one replicate these changes into the other servers of the cluster? Whenever I restart my cluster, the changes I’ve just added are overwritten by a state transfer.

]]>
By: Dim https://www.percona.com/blog/reset-mysql-root-password-without-restarting-mysql-no-downtime/#comment-10966846 Wed, 24 Aug 2016 21:46:57 +0000 https://www.percona.com/blog/?p=27156#comment-10966846 super post. thanks a lot!

]]>
By: rajesh https://www.percona.com/blog/reset-mysql-root-password-without-restarting-mysql-no-downtime/#comment-10965675 Wed, 09 Dec 2015 11:27:59 +0000 https://www.percona.com/blog/?p=27156#comment-10965675 Hi Daniel,

very good article..I got some doubts ..If we have copy user* from recover instance to original instance only root user will be copied..What about if we have other users like backup user,other users?????

And also i have faced table corruption when i copy from 3307 to 3306.

]]>
By: Brijesh Patel https://www.percona.com/blog/reset-mysql-root-password-without-restarting-mysql-no-downtime/#comment-10293559 Mon, 15 Dec 2014 17:56:21 +0000 https://www.percona.com/blog/?p=27156#comment-10293559 I really doubt you can modify user.MYD as Chintoo suggested, but you can try using one of the Hex Editor to modify the file and update or empty out the password from the file.

]]>
By: Chintoo https://www.percona.com/blog/reset-mysql-root-password-without-restarting-mysql-no-downtime/#comment-10285259 Fri, 12 Dec 2014 06:58:20 +0000 https://www.percona.com/blog/?p=27156#comment-10285259 I am working as MySQL DBA Since 2007 , This article explore the security of MysqL

Although this is Nice article , I did this step before, but that was much easier than this.

1- Go to /var/lib/mysq/mysql
2- vim user.MYD
3- check the password in the file
4- In Every production server there will be backup user with reload privileges
5- enter the MySQL with backup user
6- below command will show the backup user encrypted password
select user,password from mysql.user where user=’backup’;
7- now on OS command prompt replace with below command

sed -i ‘s/611c244e5a929da3/1d86bc847e3f5728/g’ user.MYD

8- enter the mysql prompt with backup user and execute below command

FLUSH TABLE;
FLUSH PRIVILEGES;
now exit

9- enter with root new password of backup user password without restarting MySQL

minimum backup user privileges needed.for production database

GRANT SELECT, RELOAD, EXECUTE, SHOW VIEW, EVENT ON *.* TO ‘backup’@’localhost’

]]>
By: Fadi El-Eter (itoctopus) https://www.percona.com/blog/reset-mysql-root-password-without-restarting-mysql-no-downtime/#comment-10283682 Thu, 11 Dec 2014 17:23:29 +0000 https://www.percona.com/blog/?p=27156#comment-10283682 Hi Daniel,

That is super helpful and it does save lives especially for mission critical applications.

Quick question: If someone is logged in with the old root password, and the above is done, will he be logged out or will he still be logged in?

]]>
By: Harjit Lakhan https://www.percona.com/blog/reset-mysql-root-password-without-restarting-mysql-no-downtime/#comment-10283155 Thu, 11 Dec 2014 12:09:36 +0000 https://www.percona.com/blog/?p=27156#comment-10283155 Nice work, one extra step – before copying back in step 8 – BACKUP the orignal files , JUST IN CASE!!!

]]>
By: rucypli https://www.percona.com/blog/reset-mysql-root-password-without-restarting-mysql-no-downtime/#comment-10282104 Thu, 11 Dec 2014 03:16:57 +0000 https://www.percona.com/blog/?p=27156#comment-10282104 nice

]]>