I'm on centos7, mysql8
Mysocial engine complaining that it can't login to the mysql database using the root login
I'm trying to login
# mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
I of course went through the mysql8 documentation
https://dev.mysql.com/doc/refman/8.0/en/changing-mysql-user.html
I also asked this question before but I tried the steps and it didn't work, I think it fails upon restarting my machine... how do I get a permanent solution to this?
https://www.tecmint.com/reset-root-password-in-mysql-8/ is what helped me last time.. but it is not working
Normally CentOS package installation saves the root user/pass into the ~root/.my.cnf file for future use.
So you must prepend all your mysql commands with a pointer to this file, as in...
Open in new window
As with all root level commands + permissions, you must be root to use a root level login.
If this fails, you can run with --skip-grants or reset the root password.
Careful: If you reset the root password + some other code has cached the root password, then database related code may become unstable.