Yesterday we installed MySQL on our Mac. However, you might be thinking, what about MariaDB?
MariaDB has been known to be the next step. It's highly compatible to migrate your MySQL to MariaDB.
Luckily for us, this installation process is more straightforward than MySQL since we can use Homebrew.
Install MariaDB on Mac with Homebrew
To install MariaDB, we need to have Homebrew installed first.
If you don't have this installed, follow my guide on installing Homebrew.
Open up your favorite terminal and execute the following command first to make sure Homebrew is up to date:
Then we can install MariaDB with this command:
brew install MariaDB
This will start a series of cool lines in your terminal, making you look like a hackerman! Afterward, MariaDB should run on your Mac.
Once it is done, we have successfully installed MariaDB.
We can now start or stop the MariaDB service using Homebrew:
brew services start mariadb brew services stop mariadb
Connecting to the MySQL server
Once you start the server you can run the following command to connect to the database:
mysql -uroot -p
It will ask for your password, and if correct, it will show the following:
We can also use a tool like TablePlus to connect to our MariaDB.
Add a new MariaDB connection using the following settings.
password: You choose this in the installation
port: 3306 (default)
Help, the password is wrong
I had the issue where my password didn't work because of the running instance of MySQL. First of all, stop running MySQL instances using the Settings => MySQL interface.
Now you can run the following command:
The sudo is important here to generate a new root password. In my case, I just made it the same as what I had.
Follow the steps it prompts. Everything can be answered with Yes.
Now you should be able to log in again.
Thank you for reading, and let's connect!
Thank you for reading my blog. Feel free to subscribe to my email newsletter and connect on Facebook or Twitter