Connect to a Local MySQL Server
This document describes how to connect to a server running on the same computer as Sequel Ace.
Making sure your MySQL server is running
If you are not sure if the MySQL server is running, open Activity Viewer (from Applications » Utilities). Choose All Processes in the popup menu. Type mysqld into the search field. If you see a mysqld process, MySQL is running.
Connecting via a socket connection
On macOS, Sequel Ace is sandboxed. It can only use a socket if the database server creates the socket file inside Sequel Ace’s container path.
Important notes:
- Full Disk Access does not bypass this sandbox restriction.
- The socket’s real path must be inside Sequel Ace’s container.
- A symlink-based workaround by itself is not enough. In particular, a symlink from
/tmp/mysql.sockto a Sequel Ace path does not fix Sequel Ace unless the server itself is configured to create the socket in Sequel Ace’s container.
There are two supported approaches:
Option 1: Keep using a socket (set socket path inside Sequel Ace)
- Find which config file your server actually reads.
Use whichever server binary you have:
mysqld --verbose --help | sed -n '/Default options are read from the following files in the given order:/,/^$/p'
mariadbd --verbose --help | sed -n '/Default options are read from the following files in the given order:/,/^$/p'
You can also check the current socket setting:
my_print_defaults mysqld | tr ' ' '\n' | grep '^--socket='
my_print_defaults mariadbd | tr ' ' '\n' | grep '^--socket='
Common locations on macOS:
- Homebrew (Apple Silicon):
/opt/homebrew/etc/my.cnf - Homebrew (Intel):
/usr/local/etc/my.cnf - MacPorts:
/opt/local/etc/<variant>/my.cnf - Oracle MySQL packages: often
/etc/my.cnf(or files included from there) - MAMP / MAMP PRO / XAMPP: app-managed config files
- Set the socket path to a Sequel Ace container location, for example:
/Users/YourUserName/Library/Containers/com.sequel-ace.sequel-ace/Data/mysql.sock
Add or update:
[mysqld]
socket=/Users/YourUserName/Library/Containers/com.sequel-ace.sequel-ace/Data/mysql.sock
[client]
socket=/Users/YourUserName/Library/Containers/com.sequel-ace.sequel-ace/Data/mysql.sock
-
Restart MySQL/MariaDB.
- If startup fails with an error like
Could not create unix socket lock file, verify permissions so the server process user can write in that directory:ps -Ao user,comm | grep -E 'mariadbd|mysqld' ls -ld /Users/YourUserName/Library/Containers/com.sequel-ace.sequel-ace/Data - In Sequel Ace, use a Socket connection with the same socket path.
Option 2: Use standard TCP/IP instead of a socket
If socket setup is not practical on your install, enable local TCP networking:
[mysqld]
skip_networking=0
bind_address=127.0.0.1
Then restart MySQL/MariaDB and connect in Sequel Ace using a Standard connection with:
- Host:
127.0.0.1(notlocalhost) - Username/password: same credentials you used before
- Port:
3306unless you configured another port
For MacPorts installs:
- Find your active variant:
port select --show mysql # MySQL port select --show mariadb # MariaDB - Edit that variant’s config file:
/opt/local/etc/{variant-version}/my.cnf - Restart it:
sudo port reload {variant-version}-server
If you run multiple versions at once, assign a different port=<number> to each version and use the same port in Sequel Ace.
References:
- MySQL Option Files
- MariaDB: Configuring MariaDB with Option Files
- MySQL: Can’t connect to local MySQL server
Connecting via a standard connection
Open Sequel Ace. Choose a Standard Connection. Enter 127.0.0.1 for the host. The default username for a new MySQL installation is root, with a blank password. You can leave the port field blank unless your server uses a different port than 3306.
Note: MAMP uses port 8889 per default, and root as the password. See Connecting to MAMP or XAMPP
Note: Don’t try using localhost instead of 127.0.0.1. MySQL treats the hostname localhost specially. For details, see MySQL manual.