Find the Best Cosmetic Hospitals

Explore trusted cosmetic hospitals and make a confident choice for your transformation.

“Invest in yourself — your confidence is always worth it.”

Explore Cosmetic Hospitals

Start your journey today — compare options in one place.

How to Reset or Recover Forgotten mySql root Password

Recover Forgotten mySql root Password in Linux

  • Step 1 – Locate my.ini or my.cnf in mysql server.
  • Step 2 – Edit my.ini or my.cnf and insert ‘skip-grant-tables’ below [mysqld]
  • Step 3 – Restart MySQL
  • Step 4 – Set new password for your root user by running
$ mysql -u root
mysql> UPDATE mysql.user SET Password=PASSWORD('new_password') WHERE User='root';
mysql> UPDATE mysql.user SET Password=PASSWORD('new-password-here') WHERE USER='root' AND Host='localhost';


in phpMyAdmin in the mysql database (or just leave it like this if MySQL cannot be accessed from remote hosts)
Code language: JavaScript (javascript)
  • Step 5 – Remove the skip-grant-tables in the my.ini or my.cnf file
  • Step 6 – Restart MySQL

OLD method

UPDATE mysql.user 
  SET Password = PASSWORD('NewStrongPass123!')
  WHERE User = 'root' AND Host = 'localhost';
FLUSH PRIVILEGES;Code language: JavaScript (javascript)

Resetting MySQL Root Password with XAMPP on Localhost

How to change a mysql user password?

$ mysql -u root -p
mysql> use mysql;

- The syntax is as follows for mysql database server version 5.7.5 or older:
mysql> SET PASSWORD FOR 'user-name-here'@'hostname' = PASSWORD('new-password');

- For mysql database server version 5.7.6 or newer use the following syntax:
mysql> ALTER USER 'user'@'hostname' IDENTIFIED BY 'newPass';

- You can also use the following sql syntax:
mysql> UPDATE mysql.user SET Password=PASSWORD('new-password-here') WHERE USER='user-name-here' AND Host='host-name-here';

mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'sjh643#22SLKhaA2%';
mysql> FLUSH PRIVILEGES;
Code language: JavaScript (javascript)

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services — all in one place.

Explore Hospitals
I'm Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms. I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.

Related Posts

Top 10 IT Asset Management (ITAM) Tools in 2026: Features, Pros, Cons & Comparison

Introduction IT Asset Management (ITAM) is a critical discipline that focuses on managing an organization’s technology assets throughout their lifecycle—from procurement to disposal. In 2026, with the…

Read More

Top 10 AI Essay Grading Tools in 2026: Features, Pros, Cons & Comparison

Introduction In 2026, AI essay grading tools have become indispensable for educators, students, and institutions looking to streamline the assessment process while maintaining high-quality feedback. These tools…

Read More

Top 10 AI Conversion Rate Optimization Tools in 2026: Features, Pros, Cons & Comparison

Introduction In 2026, AI-powered Conversion Rate Optimization (CRO) tools are transforming digital marketing by leveraging machine learning, predictive analytics, and real-time personalization to boost conversions. These tools…

Read More

Top 10 Integration Platform as a Service (iPaaS) Tools in 2026: Features, Pros, Cons & Comparison

Introduction In today’s fast-paced digital world, businesses are leveraging multiple software applications, cloud services, and data sources to streamline operations. However, the challenge lies in integrating these…

Read More

IReviewed Blog’s Post List

truereviewnow.com is a portal for product review and rating. truereviewnow.com is having very in-depth analysis of review and testimony of Mobiles, Laptop, Electronics Gadgets, Airports, Boradbands, Movies…

Read More

Top 10 Social Media Management Tools in 2026: Features, Pros, Cons & Comparison

Introduction In 2026, social media continues to be a cornerstone of digital marketing strategies, shaping how businesses connect with their audiences. With millions of users interacting on…

Read More
Subscribe
Notify of
guest
1 Comment
Newest
Oldest Most Voted
Skylar Bennett
Skylar Bennett
1 month ago

A useful addition would be covering the security implications after recovering access to the MySQL root account. Resetting the password restores administrative access, but production environments should also review user privileges, remove unnecessary accounts, rotate credentials, and verify authentication settings after the recovery process. It is also important to investigate why access was lost in the first place and implement preventive measures such as secure credential management and documented recovery procedures to avoid repeated incidents.

1
0
Would love your thoughts, please comment.x
()
x