How to Install MySQL 8 on macOS Catalina

Tharun Mothukuri
4 min readMay 17, 2020

--

MySQL 8.0.20

macOS 10.15.4

This is a step-by-step procedure to install MySQL8 on macOS Catalina

  1. First, check your macOS version. Click on the Apple icon on top left corner of your Mac and click on ‘About This Mac’

2. Download MySQL8 (mysql-8.0.20-macos10.15-x86_64.dmg)using this link https://dev.mysql.com/downloads/mysql/. Download the dmg archive.

3. Once you click on ‘Download’ it redirects to next page — Click ‘No thanks, just start my download’ as MySQL is open source software. It takes few minutes to download as the size is 398 MB.

4. Double click on the dmg file to start the installation.

5. You may encounter this after you click on the above .pkg file

6. Click on the ‘Apple’ icon ->System Preferences -> Security & Privacy

7. Click on the lock icon and enter password. Choose ‘App Store and identified developers’ and click on ‘Open Anyway’ (optional)

8. Once you click on ‘Open Anyway’ below window appears and click on Open to begin the installation process

9. Click on ‘Continue’ and ‘Agree’ the license agreement. Click ‘Install’ to proceed further

10. Enter the root password and remember it! Once the installation is finished, Click on ‘Apple’ icon -> System Preferences and select MySQL (usually at the bottom of the pane)

MySQL is installed on macOS

11. Verify if MySQL is running or click on ‘Start MySQL Server’ (It appears if MySQL is not running in the below window)

12. To customize MySQL configuration, Click on ‘Configuration’ tab

13. You may run into the below issue — ERROR! MySQL is running but PID file could not be found.

14. Go to /etc/paths and enter /usr/local/mysql/bin, /usr/local/mysql/support-files in separate lines

15. If you notice multiple MySQL processes , kill them using the below commands

ps aux | grep mysql (To find MySQL processes)

kill <pid1> <pid2> <pid3>

16. Now try starting MySQL service using the below commands

17. Once MySQL is running, login using the password provided during the installation process

18. MySQL starts in the background whenever your Mac Starts up as the below option is checked (by default). If you don’t want MySQL to start every time, uncheck this option (Apple -> System Preferences -> MySQL)

Great, MySQL is now installed on your macOS and ready for SQL programming!

--

--

Tharun Mothukuri

Big Data Engineer | Hadoop | Spark | NoSQL | Multi-cloud (AWS, GCP and OCI) certified | 2xMapR, Cloudera certified Hadoop Administrator