<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/install-mysql-on-macos-with-homebrew-omhiwabc2" -->

---
title: Install MySQL on macOS with Homebrew | daily.dev
description: A step-by-step walkthrough covers installing MySQL on macOS using Homebrew, from checking for conflicting database servers (MariaDB, Percona) to starting the...
canonical: https://daily.dev/posts/install-mysql-on-macos-with-homebrew-omhiwabc2
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Install MySQL on macOS with Homebrew | daily.dev
og:description: A step-by-step walkthrough covers installing MySQL on macOS using Homebrew, from checking for conflicting database servers (MariaDB, Percona) to starting the...
og:url: https://daily.dev/posts/install-mysql-on-macos-with-homebrew-omhiwabc2
og:image: https://api.daily.dev/og/posts/omhiwabc2.png
og:image:alt: Install MySQL on macOS with Homebrew
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Install MySQL on macOS with Homebrew

**[Planet MySQL](https://daily.dev/sources/planet-mysql)** · 8 min read · 1 upvotes · 0 comments

## Summary

A step-by-step walkthrough covers installing MySQL on macOS using Homebrew, from checking for conflicting database servers (MariaDB, Percona) to starting the service, running mysql_secure_installation, and verifying the connection with a version query. It also covers troubleshooting common failures like a missing mysql binary or a service that won't start due to stale config files, and points to the official DMG installer as an alternative when Homebrew isn't the right fit.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://codeforgeek.com/how-to-install-mysql-on-macos>

## Questions this post answers

### How do I install MySQL on macOS using Homebrew?

Run brew install mysql to install the unversioned formula, which downloads a MySQL bottle and places the server, client, and admin tools under Homebrew's prefix. Start the server with brew services start mysql, then run mysql_secure_installation to set a root password and remove default anonymous accounts and the test database before connecting.

_daily.dev surfaces practical setup guides for developers standing up local MySQL environments._

### Why does Homebrew warn about MariaDB or Percona Server before installing MySQL?

Homebrew lists MariaDB and Percona Server as conflicts for its mysql formula because these packages install overlapping binaries, such as the mysql client command. Checking brew list --formula for existing mariadb or percona-server installs before adding mysql avoids binary collisions that could break local projects depending on the existing server's data directory.

_Developers juggling multiple local database engines can track these compatibility quirks through daily.dev._

### How can I verify that a locally installed MySQL server is actually working after installation?

Connect with the client and run a version query: mysql -u root -p -e 'SELECT VERSION();'. A working setup returns one row with the server version; a password rejection means the client reached MySQL but credentials are wrong, while a connection refusal points to the service not running rather than a credentials problem.

_daily.dev helps developers find concrete verification steps when setting up local database services._

## Similar posts on daily.dev

- [How To Install MySQL on Ubuntu 18.04](https://daily.dev/posts/how-to-install-mysql-on-ubuntu-18-04-rnonvuufg) · DigitalOcean Community · 0 upvotes · 0 comments
- [How To Install and Use Homebrew on macOS](https://daily.dev/posts/how-to-install-and-use-homebrew-on-macos-an9tmnm6d) · DigitalOcean Community · 0 upvotes · 0 comments
- [How To Install MySQL on CentOS](https://daily.dev/posts/how-to-install-mysql-on-centos-ewkfwtusa) · DigitalOcean Community · 0 upvotes · 0 comments

---

Tags: [#database](https://daily.dev/tags/database), [#mac](https://daily.dev/tags/mac), [#mysql](https://daily.dev/tags/mysql)

[View this post on daily.dev](https://daily.dev/posts/install-mysql-on-macos-with-homebrew-omhiwabc2)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Install MySQL on macOS with Homebrew","url":"https://daily.dev/posts/install-mysql-on-macos-with-homebrew-omhiwabc2","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/install-mysql-on-macos-with-homebrew-omhiwabc2"},"datePublished":"2026-08-31T04:38:36.452Z","dateModified":"2026-09-14T07:44:01.532Z","description":"A step-by-step walkthrough covers installing MySQL on macOS using Homebrew, from checking for conflicting database servers (MariaDB, Percona) to starting the...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/0467830612a1470a2c008b3adbfa02d6?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/0467830612a1470a2c008b3adbfa02d6?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Planet MySQL","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Planet MySQL","logo":"https://media.daily.dev/image/upload/s--UKAtmXTq--/f_auto,q_auto/v1780213421/logos/planet-mysql?_a=BAMAMiWQ0","url":"https://daily.dev/sources/planet-mysql"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/install-mysql-on-macos-with-homebrew-omhiwabc2","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"database,mac,mysql","timeRequired":"PT8M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Planet MySQL","item":"https://daily.dev/sources/planet-mysql"},{"@type":"ListItem","position":3,"name":"Install MySQL on macOS with Homebrew"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/install-mysql-on-macos-with-homebrew-omhiwabc2#faq","mainEntity":[{"@type":"Question","name":"How do I install MySQL on macOS using Homebrew?","acceptedAnswer":{"@type":"Answer","text":"Run brew install mysql to install the unversioned formula, which downloads a MySQL bottle and places the server, client, and admin tools under Homebrew's prefix. Start the server with brew services start mysql, then run mysql_secure_installation to set a root password and remove default anonymous accounts and the test database before connecting. daily.dev surfaces practical setup guides for developers standing up local MySQL environments."}},{"@type":"Question","name":"Why does Homebrew warn about MariaDB or Percona Server before installing MySQL?","acceptedAnswer":{"@type":"Answer","text":"Homebrew lists MariaDB and Percona Server as conflicts for its mysql formula because these packages install overlapping binaries, such as the mysql client command. Checking brew list --formula for existing mariadb or percona-server installs before adding mysql avoids binary collisions that could break local projects depending on the existing server's data directory. Developers juggling multiple local database engines can track these compatibility quirks through daily.dev."}},{"@type":"Question","name":"How can I verify that a locally installed MySQL server is actually working after installation?","acceptedAnswer":{"@type":"Answer","text":"Connect with the client and run a version query: mysql -u root -p -e 'SELECT VERSION();'. A working setup returns one row with the server version; a password rejection means the client reached MySQL but credentials are wrong, while a connection refusal points to the service not running rather than a credentials problem. daily.dev helps developers find concrete verification steps when setting up local database services."}}]}
```

