Complete guide to installing MySQL on macOS
MySQL is a powerful and popular open-source relational database. Millions of websites use it as their back end. If you are unfamiliar with relational databases, check out our Difference between SQL and NoSQL databases? article. In this article, I provide a guide to installing MySQL on macOS.
What is MySQL?
MySQL is a SQL-based relational database management system (RDBMS). It is a well-known SQL database server with multiple users and threads. Oracle Corporation is the creator of MySQL. The term “MySQL” is a parody of the moniker of an earlier venture by co-founder Michael Widenius called Monty Python’s Flying Circus. It was created using the C and C++ programming languages, with some Java-based components. Despite being available under the provisions of the GNU Affero General Public License, it has been licensed under GPLv2 since 2004.
The MySQL database is widely used for creating and managing relational database tables as well as for storing data, particularly in online applications. MySQL was created by MySQL AB, a Swedish business that Sun Microsystems acquired in 2008. MySQL AB is now owned by Oracle Corporation. Oracle Corporation is in charge of overseeing the project as of 2009.
It is now the most widely used open-source and best database software in the world, utilized by businesses of all sizes and in all sectors for mobile and web applications.
Installing MySQL on macOS
Using Homebrew
Homebrew is a popular package manager for macOS. It provides a simple command-line interface for installing, updating, and removing software on macOS. It’s also very easy to use and manage multiple versions of software on the same machine.
Before we begin, make sure you have Homebrew installed on your Mac.
- To install MySQL using Homebrew run the following command in the Terminal:
brew install mysql
Code language: Bash (bash)
- After installation is done, start the MySQL server with this command.
brew services start mysql
Code language: Bash (bash)
and to stop the MySQL server,
brew services stop mysql
Code language: Bash (bash)
Using GUI installer
The installer is a simple GUI application, which makes it easy to install. There’s no need for a command line or terminal access, which is nice for those who aren’t that familiar with the terminal.
Let’s see how to install MySQL Graphical User Interface installer.
- Navigate to the MySQL downloads page. Scroll down till you see the “MySQL Community (GPL) Downloads” link. Click that link.
- Next, click the “MySQL Community Server” link.
- Then choose macOS in “Select Operating System” and download your preferred package.
- After downloading it, open the installer and follow the prompts to install MySQL.
Conclusion
Installing MySQL on macOS was easy and straightforward, only taking a few minutes to complete. If you want to control your database on a local server, you need to install MySQL.
While this is by no means an exhaustive list of installation instructions, it is a complete list of the tools and steps I took to successfully install MySQL on Mac. You may find that your take on this installation process varies slightly from mine, but the important thing is that you get MySQL up and running.
Sharing is caring
Did you like what Rakesh Potnuru wrote? Thank them for their work by sharing it on social media.
No comments so far
Curious about this topic? Continue your journey with these coding courses: