Failed! Error: SET PASSWORD has no significance for user ‘root’@’localhost’ as the authentication method used doesn’t store authentication data in the MySQL server.

Dixmata Studio
3 min readJun 9, 2022

Pada saat akan setup mysql_secure_installation, di Linux keluar error Failed! Error: SET PASSWORD has no significance for user ‘root’@’localhost’ as the authentication method used doesn’t store authentication data in the MySQL server. Please consider using ALTER USER instead if you want to change authentication. Kami telah mengalami hal tersebut dan menemukan solusi dari masalah Error tersebut.

Source : Solve FAILED ERRO SET PASSWORD HAS NO SIGNIFICANCE

Mengapa Terjadi Error seperti itu ?

Ini terjadi karena Motode Autentikasi pada mysql_secure_installation tidak menyimpan data Autentikasi di MySQL, Jadi untuk solusi nya kita harus menggati password terlebih dahulu.

How to Solve Failed. Failed! Error: SET PASSWORD has no significance for user ‘root’@’localhost’ as the authentication method used doesn’t store authentication data in the MySQL server. Please consider using ALTER USER instead if you want to change authentication

Berikut akan kami Dokumentasikan Solusi untuk Failed! Error: SET PASSWORD has no significance for user ‘root’@’localhost’ as the authentication

Solusi !! Failed! Error: SET PASSWORD has no significance for user ‘root’@’localhost’ as the authentication

Jalankan Perintah mysql_sercure_installation. akan keluar Error

Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : y
... Failed! Error: SET PASSWORD has no significance for user 'root'@'localhost' as the authentication method used doesn't store authentication data in the MySQL server. Please consider using ALTER USER instead if you want to change authentication parameters.

Pertama kita harus masuk ke dalam MySQL

mysql

Lalu jalankan perintah untuk mengganti Parameter Autentikan dari MySQL

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password by 'mynewpassword';

Jika sudah berhasil mengganti Autentikasi dengan Password baru. Sekarang kita dapat untuk menjalanakan perintah mysql_secure_installation

mysql_secure_installation

MySQL will confirm > Type Y

Estimated strength of the password: 100
Change the password for root ? ((Press y|Y for Yes, any other key for No) : Y

Enter new password

New password:Re-enter new password:

If you have followed the next step Remove anonymous users? > type Y

Estimated strength of the password: 100
Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : y
By default, a MySQL installation has an anonymous user,
allowing anyone to log into MySQL without having to have
a user account created for them. This is intended only for
testing, and to make the installation go a bit smoother.
You should remove them before moving into a production
environment.
Remove anonymous users? (Press y|Y for Yes, any other key for No) : Y
Success.

Disallow root login remotely? > Type “Y”

Normally, root should only be allowed to connect from
'localhost'. This ensures that someone cannot guess at
the root password from the network.
Disallow root login remotely? (Press y|Y for Yes, any other key for No) : Y
Success.

Remove test database and access to it? > Type “Y”

Remove test database and access to it? (Press y|Y for Yes, any other key for No) : Y
- Dropping test database...
Success.

Reload privilege tables now? > Type “Y”

Reloading the privilege tables will ensure that all changes
made so far will take effect immediately.
Reload privilege tables now? (Press y|Y for Yes, any other key for No) : Y
Success.
All done!

Congratulations Now you have successfully changed Password by using mysql_secure_installation.

Confirm the new password by logging into MySQL and Entering the new Password

mysql -u root -p

Create a database user and password with the same privileges as root.

CREATE USER 'usertest'@'localhost' IDENTIFIED BY 'Your-Password';
GRANT ALL PRIVILEGES ON *.* TO 'usertest'@'localhost';
FLUSH PRIVILEGES;
exit

--

--

Dixmata Studio

Dixmata Labs adalah website tutorial Belajar Linux Fundamental , Installasi Hardware dan Software yang berkaitan dengan Linux.