Connect to MariaDB in Docker from Mac
Point TableAI at the port Docker publishes on your Mac. The connection uses your database account inside MariaDB.
Before you start
Section titled “Before you start”Start the MariaDB container with a database account and a published port. This guide assumes Docker runs on your Mac. For a server on another computer, use the network connection guide.
Find your connection details
Section titled “Find your connection details”Run this in Terminal:
docker psFind the MariaDB container’s port mapping.
For 127.0.0.1:3307->3306/tcp, use these values:
| Field | Value |
|---|---|
| Host | 127.0.0.1 |
| Port | 3307 |
| Database | The database created in MariaDB |
| User, Password | The database account configured for the container |
The 3306 on the right is the container port.
A port-publishing option such as -p 127.0.0.1:3307:3306 binds the host port to loopback.
See Docker’s port publishing guide for configuration details.
Connect to MariaDB in Docker
Section titled “Connect to MariaDB in Docker”- Open a new connection using connection basics.
- Select MariaDB in Driver.
- Enter the values from your port mapping and container configuration.
- Click Test.
- Click Save & Connect after the test succeeds.
SSL and SSH
Section titled “SSL and SSH”Use SSL/TLS if you configured it on the MariaDB server. A container reached through a published localhost port does not need an SSH tunnel or macOS Local Network permission.
If it does not connect
Section titled “If it does not connect”Connection refusedAccess denied for userFor a refusal, check whether docker ps lists the container and its host port.
Inspect the container logs if the database has not finished starting.
A container without a host port mapping needs a published port before TableAI can reach it this way.
For an access error, check the database credentials and permitted client hosts. The connection reaches MariaDB through Docker’s network.
Continue with connection failures if those checks do not resolve the error.