How do I retrieve my MySQL username and password?

Mar 12, 2012   //   by phpfreelancer.biz   //   Blog, MySQL Tutorial  //  No Comments

I lost my MySQL username and password. How do I retrieve it?

List all the users

SELECT * FROM mysql.user;

To reset password

UPDATE mysql.user SET Password=PASSWORD('[password]') WHERE User='[username]'; 

Leave a comment

Share This Post

RSS Wordpress News