Connect to local MySQL from Mac
Use 127.0.0.1 as the host when MySQL runs on your Mac.
Before you start
Section titled “Before you start”Have the MySQL service running and a database account ready. For a container, use the Docker guide instead.
Find your connection details
Section titled “Find your connection details”Check the server configuration for its TCP port; the usual MySQL port is 3306. You also need the database name, user name, and password.
TableAI connects over TCP. A successful Terminal login through a Unix socket does not confirm TCP access; see socket and TCP errors.
Connect to local MySQL from Mac
Section titled “Connect to local MySQL from Mac”- Choose File › New Connection….
- Set Driver to MySQL.
- Enter a Name, such as
Bookstore Local. - Fill in the connection details below.
- Set SSL Mode for your server.
- Click Test.
- Click Save & Connect after the test succeeds.
| Field | Example |
|---|---|
| Host | 127.0.0.1 |
| Port | 3306 |
| Database | docs_bookstore |
| User | demo_user |
| Password | Your database password |
Replace the example database and account with your own. Connection basics covers password storage and other shared options.

TLS and network access
Section titled “TLS and network access”Use Disable for a trusted loopback server that does not use TLS. For certificate verification, follow SSL/TLS settings and use the hostname on the certificate.
A server on another computer needs a reachable network address. For a LAN host, check macOS Local Network permission.
If it does not connect
Section titled “If it does not connect”connection refusedAccess denied for userFor a refused connection, check that the service is running and its bind-address accepts the selected TCP address. Error 2002 gives a TCP test; error 1045 covers account checks.
Continue with write and run SQL, or return to the MySQL overview. Use connection troubleshooting for other failures.