Installing Mariadb - errors running secure installation

This is a fresh install of AlmaLinux 9 with all updates applied. I have followed the instructions on how to setup MariaDB. However, when I run the command mysql_secure_installation, I receive the following:

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we’ll need the current
password for the root user. If you’ve just installed MariaDB, and
haven’t set the root password yet, you should just press enter here.

Enter current password for root (enter for none):
ERROR 1045 (28000): Access denied for user ‘root’@‘localhost’ (using password: YES)
Enter current password for root (enter for none):
ERROR 1045 (28000): Access denied for user ‘root’@‘localhost’ (using password: YES)
Enter current password for root (enter for none):

I have followed the prompts as stated in the installation to no avail. I have another server running AlmaLinux 9 with no problems.

Thank you

Found the solution. I needed to delete the mariadb tables after uninstalling. Then when I re-installed MariaDB, everything worked as expected.