Fixing a MariaDB database that has a corrupted root user password.
In one terminal window I did this:
echo $(brew --prefix MariaDB)
That gave me the path to my MariaDB of:
Then I ran this in that same window:
That started MariaDB successfully.
Then I opened a 2nd terminal window.
sudo $(brew --prefix mariadb)/bin/mysqladmin -u root password
I followed the prompts to reset the password to ”, i.e. blank.
Then I killed the MariaDB current running by entering (in the same window I just reset the password in)
That stopped the Mariadb that was running.
Then back in the 1st window, i started Mariadb as I normally would:
Then I was able to successfully log into root via
That was more painful that it seems.
Link to this page