[HOW TO] reset MySQL root password on Linux

In this article I will show you how to reset MySQL root password.

Step 1: Stop MySQL server
/etc/init.d/mysql stop (systemd)systemctl stop mysqld (systemv)

Step 2: Start MySQL configuration
mysqld --skip-grant-tables &

Step 3: Login MySQL as root without password
mysql -uroot mysql

Step 4: Replace NEWPASSWORD
mysql>UPDATE user SET Password=PASSWORD('YOUR_PASSWORD') WHERE User='root';
mysql>FLUSH PRIVILEGES;

Thank you for reading this article, please a comment if you are interested.

Tiến Phan - R0039

Knowledge is Endless

Sharing for Success

0 nhận xét:

Post a Comment