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
TOOLS
Build Your Own AI Agent Team in 15 Min — Free OpenClaw Guide
Build Your Own AI Agent Team in 15 Min — Free OpenClaw Guide
Feb 5, 2026
TOOLS
OpenClaw AI Assistant: Local 24/7 Automation Guide 2026
OpenClaw AI Assistant: Local 24/7 Automation Guide 2026
Feb 4, 2026
TOOLS
SQL WITH Clause (CTE): Complete Guide with Examples
SQL WITH Clause (CTE): Complete Guide with Examples
Jan 14, 2026
TOOLS
MySQL to PostgreSQL Migration: Complete 2026 Guide with Syntax Conversion
MySQL to PostgreSQL Migration: Complete 2026 Guide with Syntax Conversion
Jan 14, 2026
TOOLS
SQL vs Excel: When Should You Make the Switch? [2026]
SQL vs Excel: When Should You Make the Switch? [2026]
Jan 14, 2026
Copyright © AI2sql 2026
Cross Regions Technology
13553 Atlantic Blvd, Suite 201
FL 32225
Company