0

I had mysql 8 installed and running locally on centos 7. The other day it just stopped accepting the root password. I've tried every tutorial online to reset the root password but nothing has worked. I even tried setting the authentication string in the user table to match that of another user who's password is known and works. Still couldn't login as root. Finally, I uninstall everything related to mysql (or so I thought) and reinstalled. I'm at the step of running mysql_secure_installation which then asks to login as root (which should have a blank password) and that denies access.

I've uninstalled mysql, deleted the databases and folder structure and reinstalled. I still can't get it to login as root.

I've tried the whole: mysqld --skip-grant-tables --user=mysql &

I'm unable to alter the root password, get an error every time. So I created a new user with all privileges. Not able to login with that either. Btw, I've also done a sudo su before trying all of this. I've literally tried everything I can think of and its still access denied logging to mysql, despite that its be reinstalled 3 times now. There's gotta be something left behind somewhere after an uninstall I'm not seeing. At this point I've lost my mind and about to have this laptop reimaged unless someone has any ideas?

1
  • Please edit your question and include the steps you take to remove and reinstall mysql.
    – Panki
    Dec 10 '20 at 15:59
0

So despite everything I read on setting up a new mysql installation telling me the default password is empty, it was in fact not. In the mysql log you can find a temporary password for root. Still unclear what happened with my initial setup, but I'm up and running again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.