There's litterally hundred of questions revolving around the error I am getting:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
And none work. Ive ben uninstalling and installing mysql8 for 2 days solid. And have hit dead end after dead end.
I even tried installing 5.7 to save the headache, and hit another dead end.
So Im back to mysql 8.
I can loginto phpmy admin using the root user and password. But not on the putty/console.
Does anyone have any idea what the heck ois wrong with mysql8.
Im using Ubuntu 22.04 and the latest mysql. Which is running by the way.
The only way I can gain access is by adding the:
[mysqld]
skip-grant-tables
Line, but when I change the password, or create another user, and remove that line. I still get the same error.
I have tried using the default mysqld.cfg as well as a version from an old VPS that works using 5.7. Another dead end.
Im beginning to think this is a purpose built dead end. Ive treied everything.
Andy ideas appreciated.
The bind address is as follows:
bind-address = 127.0.0.1
mysqlx-bind-address = 127.0.0.1
Ive tried using 0.0.0.0, my external IP, and none make a difference.
I followed the Digital Ocean install instructions but each time I end up with the same issue.
https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu-22-04
Thanks.
Heres some of what Ive tried, but frankly, Ive tried many many solutions proposed on here and through google and ended up at the dead end I keep referring to.
I tried using: sudo mysql -u root (thats a standard procedure for me at this point).
Tried: Start with skip-grant-tables and reset the password etc.
These are the two most common solutions.
I recently tried: sql UPDATE mysql.user SET plugin='unix_socket' WHERE user='root'; flush privileges - after starting in safe mode skipping-grant-tables, but ended up with another error that solutions wouldnt work for. Plugin 'unix_socket' is not loaded in Mysql
Also tried: mysql -u root -p -f - no luck there.
Also tried: removing and reinstalling several times, following several tutorials. Digital Ocea, and LinuxBabe,but herss is MariaDB. And I dont want to introduce other possible issues when I move my sites over to thei server? IF I do.
I also did a system upgrade from 18.04 to 22.04 and the same issue prevented me using that system. I have to restore the backup because mysql wouldnt connect after being upgraded from 5.7. Which works stratight awaay, every time I have installed it. over a dozen times.
I am about to test this installation tutorial as it includes a few minor? steps the other tutorials didnt show: https://www.youtube.com/watch?v=SmgiRNoH52s
END NOTE:
So although the video above was very different, I managed to get it sorted so I can access mysql in console using password/root user. And I can access phpmyadmin using the same. However if you see my comment at the end of that video. He proceeds to use the ALTER command to change the password back to socket instead of password. WHY is that? I'm backing up now before I try that, but not sure I should ALTER it back to socket at all? Any advice appreciated.Thanks for the push @vidaro as I was ready to jump off a * cliff!