Skip to content

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.

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.

Run this in Terminal:

Terminal window
docker ps

Find 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.

  1. Open a new connection using connection basics.
  2. Select MariaDB in Driver.
  3. Enter the values from your port mapping and container configuration.
  4. Click Test.
  5. Click Save & Connect after the test succeeds.

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.

Connection refused
Access denied for user

For 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.