So I installed MySQL-server following these steps: https://www.hostinger.com/tutorials/how-to-install-mysql-on-centos-7
Then it does not matter what I do, MySQL will just NOT accept any password.
I tried MySQL -u root -p
, but I get this, regardless of what password I input (or even no password):
[root@AAA ~]# mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
I read that mysqladmin -u root
should be able to reset te password. Still gives me the exact same error.
Then I tried MySQL_secure_installation
, because I read it's used to setup root password first time. It literally gives me the same error as before:
[root@AAA ~]# mysql_secure_installation
Securing the MySQL server deployment.
Enter password for user root:
Error: Access denied for user 'root'@'localhost' (using password: YES)
This is infuriating. I have no idea what to do anymore. Why does this setup in particular have to be so incredibly convoluted and borderline stupid? As opposed to something like httpd that has proper configuration files and everything is properly explained...