/

/

SQL on Mac M4: Complete Setup Guide for Local Development (2026)

Content

SQL on Mac M4: Complete Setup Guide for Local Development (2026)

SQL on Mac M4: Complete Setup Guide for Local Development (2026)

SQL on Mac M4: Complete Setup Guide for Local Development (2026)

SQL on Mac M4: What You Need to Know

Apple Silicon has introduced some friction when setting up SQL databases locally. PostgreSQL, MySQL, and SQLite all run natively on M4. SQL Server is the tricky one, but Docker makes it manageable.

Before You Start: Homebrew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

PostgreSQL on Mac M4

brew install postgresql@16
brew services start postgresql@16
createdb mydev
psql mydev

Performance Tip

shared_buffers = 256MB
work_mem = 16MB
maintenance_work_mem = 128MB
effective_cache_size = 1GB

MySQL on Mac M4

brew install mysql
brew services start mysql
mysql_secure_installation
mysql -u root -p

SQL Server on Mac M4: Docker

docker pull mcr.microsoft.com/mssql/server:2022-latest
docker run -e "ACCEPT_EULA=Y" \
  -e "MSSQL_SA_PASSWORD=YourStrong@Passw0rd" \
  -p 1433:1433 --name sqlserver \
  --platform linux/amd64 \
  -d mcr.microsoft.com/mssql/server:2022-latest

Note the --platform linux/amd64 flag. SQL Server runs under Rosetta emulation on M4.

SQLite on Mac M4

sqlite3 --version
sqlite3 mydev.db

Already installed on macOS. Zero setup needed.

GUI Tools

  • TablePlus — Supports all databases. Native Apple Silicon.

  • DBeaver — Free, open source.

  • Azure Data Studio — Best for SQL Server.

The Alternative: Skip Local Setup

AI2SQL lets you connect your database and write SQL from any browser on your M4 Mac without any local configuration.

Troubleshooting

  • Homebrew: Make sure you use ARM64 at /opt/homebrew, not x86 at /usr/local

  • PostgreSQL: Check logs at /opt/homebrew/var/log/postgresql@16.log

  • SQL Server Docker: Requires strong password and 4GB RAM in Docker settings

  • MySQL socket errors: mysql -u root -p --socket=/tmp/mysql.sock

Share this

More Articles

More Articles

More Articles