Monday, March 19, 2012

Reset root password in mysql linux ubuntu

On ubuntu shell execute following commands:

1. sudo /etc/init.d/mysql stop
2. sudo /usr/sbin/mysqld --skip-grant-tables --skip-networking &
3. mysql -u root
4. FLUSH PRIVILEGES;
5. SET PASSWORD FOR root@'localhost' = PASSWORD('whateverpassword you like'); 
6. UPDATE mysql.user SET Password=PASSWORD('newpwd') WHERE User='root';
 
So now you are logged in mysql you can create users and do whatever you want to do.
 
 
 
 
 For more options visit
 
https://help.ubuntu.com/community/MysqlPasswordReset 

No comments:

Post a Comment

Thank you for Commenting Will reply soon ......

Featured Posts

🎬 Installing Kali Linux on a Virtual Machine | Step-by-Step Guide 🐧

🎬 In this video, I’ll show you how to install Kali Linux 🐧 inside a Virtual Machine step-by-step! Whether you're a beginner curious...