Error Reference
Every error message you may encounter in SQLAgent, with explanations and fixes.
Connection Errors
Errors that appear when connecting to a database server.
Not connected to database
No active database connection. Open SQLAgent and connect to a server before running queries or browsing tables.
Connection failed: …
The database server refused the connection. Common causes:
- The server is not running or not reachable from your network
- Wrong host, port, or credentials
- Firewall blocking the port
- Cloud database requiring IP whitelisting
Authentication failed. Check username and password.
The server rejected your credentials. Double-check your username and password. For MySQL, ensure the user has permission to connect from your IP address.
SSL connection required by server
The server requires an encrypted connection. Enable SSL in the connection form. You may also need to provide a CA certificate if the server uses a self-signed cert.
Connection timeout
SQLAgent couldn't reach the server within the time limit. Check that the host and port are correct, your internet connection is stable, and no firewall is blocking traffic.
Connection lost
The connection to the database was dropped unexpectedly. SQLAgent will attempt to reconnect automatically (up to 3 times). If reconnection fails, check your network and reconnect manually.
Could not reconnect after 3 attempts
Auto-reconnect failed. The server may be down or your network changed. Disconnect and reconnect manually from the connection form.
SSH Tunnel Errors
Errors related to SSH tunneling for remote database access.
SSH host is required
You enabled SSH tunneling but didn't provide a hostname for the SSH server. Enter the SSH server address (e.g. bastion.example.com).
SSH username is required
Provide the SSH username to authenticate with the tunnel server.
Private key file not found
The SSH private key file doesn't exist at the specified path. Check the file path and ensure the key file is readable (e.g. ~/.ssh/id_rsa).
SSH tunnel timeout after 10 seconds
The SSH connection couldn't be established in time. Verify the SSH host and port are correct, and that the server allows your key or password authentication.
Could not allocate a local port for SSH tunnel
SQLAgent couldn't find a free local port to forward traffic through. This is rare — try closing other apps that may be using many ports, or restart SQLAgent.
SQLite Errors
Errors when connecting to or querying local SQLite databases.
File not found
The SQLite database file does not exist at the specified path. Check that the path is correct and the file hasn't been moved or deleted.
Not a valid SQLite database
The file exists but is not a readable SQLite database. It may be corrupted, encrypted, or not a database file at all. Verify the file by running file yourfile.sqlite in Terminal.
Permission denied
You don't have permission to read this file. The validation banner shows the file owner. You may need to adjust file permissions with chmod or run SQLAgent as a user with access.
Read-only database
The database file is readable but not writable. You can browse and query data, but INSERT, UPDATE, and DELETE operations will fail. To enable writes, check the file permissions and ownership.
database is locked
Another process has an exclusive lock on the SQLite database. Close other applications using the file (e.g. another database client, a running server, or a Wrangler dev instance) and try again.
Cloudflare D1 Errors
Errors specific to Cloudflare D1 database connections.
D1 authentication failed
Your Cloudflare API token is invalid or doesn't have D1 permissions. Go to the Cloudflare dashboard and create a token with D1 Edit permissions.
Access denied. Check that your API token has D1 permissions.
The API token exists but lacks the required D1 scope. Edit your token in Cloudflare and add the Account → D1 → Edit permission.
Database ID '…' not found
The D1 database UUID doesn't match any database in your account. Copy the correct ID from Workers & Pages → D1 in your Cloudflare dashboard.
Rate limit exceeded. Cloudflare allows 1200 requests per 5 minutes.
You've hit the Cloudflare API rate limit. Wait a few minutes before making more requests. Consider batching your queries to reduce API calls.
No D1 database selected
You're connected to D1 but haven't selected a database yet. Go back to the database list and select one.
No internet connection
D1 requires internet access to communicate with Cloudflare's API. Check your network connection.
Cannot reach Cloudflare API
SQLAgent can't connect to api.cloudflare.com. This could be a DNS issue, a firewall, or a Cloudflare outage. Check Cloudflare Status.
D1 / SQLite SQL Hints
SQLAgent detects MySQL-style SQL and suggests the equivalent SQLite syntax for D1.
no such function: CONCAT
SQLite uses || for string concatenation instead of CONCAT().
first_name || ' ' || last_name
no such function: NOW
SQLite uses datetime('now') instead of NOW().
SELECT datetime('now');
no such function: CURDATE
SQLite uses date('now') instead of CURDATE().
SELECT date('now');
no such function: ISNULL
Use IFNULL() or COALESCE() in SQLite instead of ISNULL().
SELECT IFNULL(column, 'default') FROM table;
no such function: DATE_FORMAT
Use strftime() in SQLite instead of DATE_FORMAT().
SELECT strftime('%Y-%m-%d', date_column) FROM table;
SHOW commands are MySQL-specific
- Tables:
SELECT name FROM sqlite_master WHERE type='table' - Columns:
PRAGMA table_info('table_name') - Indexes:
PRAGMA index_list('table_name')
DESCRIBE / DESC is not supported
Use PRAGMA table_info('table_name') instead of DESCRIBE.
TRUNCATE TABLE is not supported
SQLite doesn't support TRUNCATE TABLE. Use DELETE FROM table_name instead.
AUTO_INCREMENT syntax
In SQLite, use INTEGER PRIMARY KEY for auto-incrementing IDs. The AUTOINCREMENT keyword is optional and behaves differently than MySQL's AUTO_INCREMENT.
Query Errors
Errors that occur when executing SQL queries.
Query timed out after N seconds
Your query took longer than the configured timeout. Try adding a LIMIT clause, more specific WHERE conditions, or increase the timeout in Settings.
Query failed: …
The SQL query contains a syntax error or references a non-existent table/column. Check the error detail for the specific SQL issue.
Database '…' not found
The database name doesn't exist on this server. Use the database list to see available databases.
Table '…' not found
The table doesn't exist in the current database. It may have been dropped or renamed. Refresh the table list to see current tables.
Save failed
An inline edit couldn't be saved. This can happen if the row was modified by another client, a constraint was violated, or the connection was lost.
AI Assistant Errors
Errors from the AI SQL assistant (Pro feature).
No API key configured
The AI assistant needs an API key. Go to Settings → AI Assistant and add your Anthropic, OpenAI, or xAI key.
Invalid API key
Your API key was rejected by the provider. Verify it in Settings → AI Assistant. Make sure you're using the correct provider (Anthropic vs OpenAI vs xAI).
Failed to parse AI response
The AI returned an unexpected format. Try rephrasing your prompt or switching to a different model in Settings.
MySQL Errors
Low-level MySQL protocol errors.
Failed to read/write packet header
The TCP connection to MySQL was interrupted mid-communication. This usually means the server closed the connection (idle timeout, crash, or network drop). SQLAgent will attempt to reconnect automatically.
Invalid packet length
Received a malformed packet from the MySQL server. This can indicate a protocol mismatch, network corruption, or an incompatible server version.
Could not create socket streams
SQLAgent couldn't establish a TCP connection to the MySQL host. Verify the host and port, and check that no firewall is blocking the connection.