Comments - Upgrading from MySQL to MariaDB
Content reproduced on this site is the property of its respective owners,
and this content is not reviewed in advance by MariaDB. The views, information and opinions
expressed by this content do not necessarily represent those of MariaDB or any other party.
Not realizing my iMac came with MySQL installed, I just installed MariaDB, but I can't log in or run mysql_secure_installation because I don't know the password for 'root'@'localhost'.
How do I get past that? Unless MacOS has been using it, there's nothing I need to keep.
See Troubleshooting Connection Issues. You may want to consider whether you actually need to run mysql_secure_installation, and whether you actually have a root password, but instead are running unix socket authentication. See Authentication from MariaDB 10.4.
Not knowing any way to get access other than "$ sudo mysql", and knowing any other way into it, that was the only path I knew. I solved the immediate problem by running mysql_secure_installation as root, and set a MySQL root password; problem solved. But now I'll go to that link you gave because I need to educate myself on this topic, too, Actual SQL will have to wait.