ot error: 1045: Access denied for user 'root'@'localhost'

When I try to:
mysqlcheck --all-databases -r #check
mysqlcheck --all-databases -r #repair
mysqlcheck --all-databases -a #analyze
mysqlcheck --all-databases -o #optimize

This appears:
mysqlcheck: Got error: 1045: Access denied for user ‘root’@‘localhost’ (using password: YES) when trying to connect

How can I fix it?

Unable to access to PHPMyAdmin with root access too: mysqli_real_connect(): (HY000/2002): Connection refused

mysql -u root -p;
Enter password:
ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (111 “Connection refused”)

And chose the password from: cat /etc/cyberpanel/mysqlPassword

111 means Connection refused. That is, nothing is listening to that socket.

This means that MariaDB is not running, or is misconfigured
systemctl status mariadb