I have installed MariaDB via Homebrew after following this guide. It has been working fine, however today the root password has expired and I cannot seem to reset it with any of the —skip-grant-tables —skip-networking
type options.
So far I have tried:
brew services stop mariadb
mysqld_safe --skip-grant-tables --skip-networking
mysql_secure_installation
also tried
mysql_secure_installation --connect-expired-password
Which gives me:
In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.
Enter current password for root (enter for none):
/usr/local/Cellar/mariadb/10.3.13_1/bin/mysql: unknown option '--connect-expired-password'
OK, successfully used password, moving on...
Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.
Set root password? [Y/n] Y
New password:
Re-enter new password:
/usr/local/Cellar/mariadb/10.3.13_1/bin/mysql: unknown option '--connect-expired-password'
Password update failed!
Cleaning up...
I've also added:
[mysqld]
default_password_lifetime=0
skip-grant-tables
to /usr/local/etc/my.cnf
Still doesn't let me update the root password with the above commands. Brew doctor comes back clean and I'm running out of things to try.