MySQL Forums
Forum List  »  Newbie

Re: Ubuntu 22.04. Getting error when running "sudo mysql_secure_installation".
Posted by: Thomas Childers
Date: June 20, 2023 05:18AM

(Here's the full text.)

Ubuntu 22.04 LTS Desktop Gnome. MySQL 8. Server version: 8.0.33-0ubuntu0.22.04.2 (Ubuntu)

Details of error: How to fix? I'm new to sql. Also see here: https: //imgur. com/HJ5imhH.png

advait@advait-Bravo-15-A4DDR:~$ sudo mysql_secure_installation [sudo] password for advait:

Securing the MySQL server deployment.

Connecting to MySQL using a blank password.

The 'validate_password' component is installed on the server.

The subsequent steps will run with the existing configuration of the component. Please set the password for root here.

New password:

Re-enter new password:

Estimated strength of the password: 25 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.
Here was my attempt to fix. Didn't work. How to reset the password?

advait@advait-Bravo-15-A4DDR:~$ sudo k illall -9 mysql_secure_installation
mysql_secure_installation: no process found

advait@advait-Bravo-15-A4DDR:~$ sudo mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 20 Server version: 8.0.33-0ubuntu0.22.04.2 (Ubuntu)

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'SetRootPasswordHere'; Query OK, 0 rows affected (0.01 sec)

mysql> exit Bye

advait@advait-Bravo-15-A4DDR:~$ sudo mysql_secure_installation

Securing the MySQL server deployment.

Enter password for user root: Error: Access denied for user 'root'@'localhost' (using password: YES)

Options: ReplyQuote

Written By
Re: Ubuntu 22.04. Getting error when running "sudo mysql_secure_installation".
June 20, 2023 05:18AM

Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.