Computers, Laptops & Tablets Apple How to Install MySQL on macOS Run your own database on your mac By Aaron Peters Writer Aaron Peters is a writer with Lifewire who has 20+ years experience in technology. His work appears in Linux Journal, MakeUseOf, and others. our editorial process Twitter LinkedIn Aaron Peters Updated June 24, 2019 MySQL.com/Oracle Corp. Apple Macs iPad Tweet Share Email Installing the MySQL database on macOS is much like installing it on Windows 10. You're likely doing it for the same reasons, including self-learning, maintaining your structured data on your own machine, or learning various types of programming. With that said, let's jump right into how to install MySQL on macOS Mojave. Instructions in this article focus on macOS Mojave, although the steps should be similar when installing the latest version of MySQL on the latest version of macOS. How to Download MySQL for macOS Go to the MySQL website. Select Downloads in the main navigation, then select Community Edititon in the sub-menu. Select MySQL Community Server. Scroll past the documentation links to the bottom section and select Download to the right of macOS 10.14 (x86, 64-bit), DMG Archive. The Mac installer doesn't give you a lot of the extras. If you want documentation, sample databases, or a GUI DB explorer, you'll need to hunt them down yourself. Next you'll see buttons to either log into your Oracle Web account, or sign up for a new one. Select No thanks, just start my download. Once your download is finished, you're ready to start the installation. How to Install MySQL on macOS The DMG archive for MySQL contains a nice, wizard-style installer. To install MySQL, take the following steps: If you want to install MySQL on an older macOS version, you could use one of the macOS open source package managers, including Homebrew or MacPorts. In particular, Homebrew seems to have a very recent version of MySQL, but will install it on Mojave, High Sierra, or even Sierra. Double-click the .DMG file to open it. Inside, double-click the PKG installer. The installer will initially let you know it will check for prerequisites. Click Continue to start. The first step of the install contains some links to MySQL-related info, such as the documentation. Click Continue. Next, you'll need to accept the software's license, which is the GNU Greater Public License, or GPL. Since MySQL is open source software, it basically says you won't take this free resource and try to make something from it you also don't release for free. Click Continue, then click Agree to move on. The fourth screen asks if you want to change the install location. By default, this is your machine's "main" hard drive (i.e. the drive where macOS is installed). If you have a fancy setup with other drives, click Change Install Location... to place the software elsewhere. For most of us, click Install to proceed. The install includes a command-line client; it's way down in "/usr/local/mysql/bin." What's more, this might not be added to your path variable, meaning you'll need to enter the full path in order to run it. The installer will ask for your password to move forward. Enter it, then click Install Software. Now the install will finally start. Copying the files to your machine should be fairly quick. The next thing you'll do is configure some parts of the server. The first asks for your password type. You're good to click Use Strong Password Encryption here, then click Next. The other option is to support older versions but also opens the door for you to select a weak password. Finally, you'll be asked for a MySQL root password. The root user is the superuser of the MySQL subsystem. Click Finish when you're done. The last screen displays a summary and some links again. Installation complete! How to Run MySQL on macOS Your first instinct to run MySQL after installation might be to open the Applications menu, but MySQL is a server application, so you won't find it there. You'll need to dig into the technical details for MySQL to be of much use to you. Be sure to brush up on the fundamentals of SQL. Click the Apple logo in the top left corner of the screen, then click System Preferences. Click MySQL to launch it. The MySQL database server runs on port 3306 by default. If you plan on connecting to the database from another machine, you may need to adjust your firewall. From here, there are various things you can do: Click the Start MySQL Server button to Start and stop the server.Choose whether you want the server to run automatically at start-up.Click Initialize Database to reconfigure the default database.Uninstall MySQL. Click the Configuration tab to set advanced options, including data directories, the location of the error log, or a custom configuration file, if you have one. You're done!