MySQL रन से कनेक्ट होने के बाद
use mysql;
update user set user='admin' where user='root';
flush privileges;
बस इतना ही।
अगर आप भी पासवर्ड बदलना चाहते हैं, तो MySQL <5.7 में रन करें
update user set password=PASSWORD('new password') where user='admin';
flush privileges; . MySQL>=5.7 में, password user . में फ़ील्ड तालिका का नाम बदलकर authentication_string कर दिया गया , तो उपरोक्त पंक्ति बन जाती है:
update user set authentication_string=PASSWORD('new password') where user='admin';