Skip to main content

Common Issues

This guide covers the most common problems you might encounter and how to solve them.

Connection Issues

Problem: You see “Connection test failed” when adding a connection.Symptoms:
$ queryly connect add
? Connection name: MyDB
? Database type: SQLite
? Connection string: Data Source=mydb.db

Testing connection...
 Connection test failed: Unable to open database file
Solutions:
  1. Verify Connection String Format Ensure you’re using the correct format for your database type:
    Data Source=./mydb.db
    
  2. Check Database File Exists (SQLite)
    # Verify the file exists
    ls -la mydb.db
    
    # Check the path is correct
    pwd  # See current directory
    
    Use absolute paths if relative paths aren’t working: Data Source=/full/path/to/mydb.db
  3. Verify Read Permissions
    # Check file permissions (macOS/Linux)
    ls -l mydb.db
    
    # Give yourself read access if needed
    chmod 644 mydb.db
    
  4. Test Database Connection Separately
    sqlite3 mydb.db "SELECT 1;"
    
  5. Check Network Connectivity (Remote Databases)
    # Test if server is reachable
    ping db.example.com
    
    # Test if port is open
    telnet db.example.com 5432  # PostgreSQL
    telnet db.example.com 3306  # MySQL
    telnet db.example.com 1433  # SQL Server
    
Problem: Your connection string format is rejected.Solutions:
  1. Remove Quotes: Don’t wrap the connection string in quotes
    # ✗ Incorrect
    "Data Source=mydb.db"
    
    # ✓ Correct
    Data Source=mydb.db
    
  2. Check for Typos: Common mistakes include:
    • DataSource instead of Data Source (SQLite)
    • Username instead of User (MySQL)
    • UserId instead of User Id (SQL Server)
  3. Escape Special Characters: If your password contains special characters:
    # Use URL encoding or escape characters
    Password=my%40password  # @ symbol encoded
    
Problem: Queryly can’t find a connection you know you saved.Solutions:
  1. List All Connections
    queryly connect list
    
    Verify the exact name (case-sensitive).
  2. Check Configuration File
    # macOS/Linux
    cat ~/.queryly/connections.json
    
    # Windows (PowerShell)
    Get-Content $env:USERPROFILE\.queryly\connections.json
    
  3. Verify JSON Syntax If you manually edited the file, ensure it’s valid JSON:
    # Validate JSON (if jq is installed)
    jq empty ~/.queryly/connections.json
    

Installation Issues

Problem: You see queryly: command not found when trying to run Queryly.Symptoms:
$ queryly connect list
queryly: command not found
Solutions:
  1. Use Full dotnet run Command Queryly is not installed as a global tool yet. Run it with:
    dotnet run --project src/Queryly.CLI/Queryly.CLI.csproj
    
  2. Create an Alias (macOS/Linux) Add to your ~/.bashrc or ~/.zshrc:
    alias queryly='dotnet run --project /path/to/queryly/src/Queryly.CLI/Queryly.CLI.csproj'
    
    Then reload:
    source ~/.bashrc  # or ~/.zshrc
    
  3. Check .NET SDK Installation
    dotnet --version
    
    Should output version 8.0 or higher. If not installed:
    # Download from:
    # https://dotnet.microsoft.com/download
    
  4. Verify Project Build
    cd /path/to/queryly
    dotnet build
    
Problem: Error about missing .NET SDK.Solutions:
  1. Install .NET 8.0 SDK Download from: https://dotnet.microsoft.com/download
    brew install --cask dotnet-sdk
    
  2. Verify Installation
    dotnet --list-sdks
    

Schema and Data Issues

Problem: “No tables found” message when listing schema.Symptoms:
$ queryly schema list MyDB
No tables found in database.
Solutions:
  1. Verify Database Has Tables Use another tool to confirm:
    # SQLite
    sqlite3 mydb.db ".tables"
    
    # PostgreSQL
    psql -h localhost -U postgres -d mydb -c "\dt"
    
    # MySQL
    mysql -h localhost -u root -p mydb -e "SHOW TABLES;"
    
  2. Check Connection String Points to Correct Database
    queryly connect test MyDB
    
    Verify the database name in the output.
  3. Verify Permissions Ensure your database user has permission to read schema:
    -- PostgreSQL: Check permissions
    SELECT * FROM information_schema.table_privileges 
    WHERE grantee = 'your_username';
    
  4. Check Schema Name (SQL Server/PostgreSQL) Some databases use schemas. Queryly defaults to common schemas, but you might need a different one:
    -- PostgreSQL: List all schemas
    SELECT schema_name FROM information_schema.schemata;
    
    -- SQL Server: List schemas
    SELECT name FROM sys.schemas;
    
Problem: queryly data browse shows no rows when you know the table has data.Solutions:
  1. Verify Table Has Data
    queryly data query MyDB
    SQL> SELECT COUNT(*) FROM users;
    
  2. Check for Case Sensitivity Table names might be case-sensitive:
    # Try different cases
    queryly data browse MyDB Users
    queryly data browse MyDB USERS
    queryly data browse MyDB users
    
  3. Use Query Mode to Debug
    queryly data query MyDB
    SQL> SELECT * FROM users LIMIT 10;
    
Problem: Export command fails or produces an empty file.Symptoms:
$ queryly data export MyDB users csv
 Export failed: Access denied
Solutions:
  1. Check Write Permissions Ensure you have write access to the current directory:
    # Check current directory
    pwd
    
    # Check permissions
    ls -ld .
    
    # Try exporting to a different directory
    cd ~/Documents
    queryly data export MyDB users csv
    
  2. Verify Table Name
    queryly schema list MyDB
    
    Ensure the table name is correct (case-sensitive).
  3. Check Table Has Data
    queryly data browse MyDB users
    
    If the table is empty, export will create an empty file.
  4. Check Disk Space
    # Check available space
    df -h .
    
  5. Try Different Format If CSV fails, try JSON:
    queryly data export MyDB users json
    

Query Issues

Problem: Interactive query mode becomes unresponsive.Solutions:
  1. Exit with Ctrl+C Press Ctrl+C to force exit.
  2. Check for Long-Running Query If you ran a complex query, it might be processing. Wait or cancel with Ctrl+C.
  3. Simplify Query Break complex queries into smaller parts:
    -- Instead of a complex JOIN, start simple
    SQL> SELECT * FROM users LIMIT 10;
    
Problem: Your query returns a syntax error.Solutions:
  1. Check SQL Dialect Different databases have different syntax:
    -- Use LIMIT
    SELECT * FROM users LIMIT 10;
    
  2. Quote Table/Column Names If names contain spaces or special characters:
    -- SQLite/PostgreSQL
    SELECT * FROM "user data";
    
    -- SQL Server
    SELECT * FROM [user data];
    
    -- MySQL
    SELECT * FROM `user data`;
    
  3. Test in Native Client First Verify the query works in the database’s native client before using Queryly.

Configuration Issues

Problem: Queryly won’t start due to corrupted configuration.Solutions:
  1. Validate JSON
    # Check for JSON errors
    cat ~/.queryly/connections.json
    
  2. Backup and Reset
    # Backup existing config
    cp ~/.queryly/connections.json ~/.queryly/connections.backup.json
    
    # Remove corrupted file
    rm ~/.queryly/connections.json
    
    # Queryly will create a fresh one on next run
    
  3. Manually Fix JSON Common issues:
    • Missing commas between objects
    • Trailing commas
    • Unescaped quotes in strings
    Use a JSON validator: https://jsonlint.com/
Problem: Connections disappeared after updating Queryly.Solutions:
  1. Check Backup
    ls -la ~/.queryly/
    
    Look for connections.backup.json or similar.
  2. Restore from Backup
    cp ~/.queryly/connections.backup.json ~/.queryly/connections.json
    
  3. Manually Recreate If no backup exists, re-add connections:
    queryly connect add
    

Platform-Specific Issues

Problem: SQLite database path not found on Windows.Solutions:
  1. Use Forward Slashes
    Data Source=C:/Users/username/mydb.db
    
  2. Or Use Double Backslashes
    Data Source=C:\\Users\\username\\mydb.db
    
  3. Use Relative Path
    Data Source=./mydb.db
    
Problem: Permission denied errors on macOS.Solutions:
  1. Check File Permissions
    ls -l mydb.db
    chmod 644 mydb.db
    
  2. Grant Full Disk Access System Preferences → Security & Privacy → Privacy → Full Disk Access → Add Terminal
Problem: Missing library errors on Linux.Solutions:
  1. Install Required Libraries
    # Ubuntu/Debian
    sudo apt-get update
    sudo apt-get install libicu-dev
    
    # Fedora/RHEL
    sudo dnf install icu
    
  2. Install Database Client Libraries
    sudo apt-get install libpq-dev
    

Performance Issues

Problem: Queries take too long to execute.Solutions:
  1. Add LIMIT Clause
    SELECT * FROM large_table LIMIT 100;
    
  2. Check Database Indexes Ensure proper indexes exist on frequently queried columns.
  3. Use Browse Instead of Query For simple table viewing, browse is optimized:
    queryly data browse MyDB large_table
    
Problem: Exporting large tables fails or times out.Solutions:
  1. Export in Batches Use query mode to export specific ranges:
    SQL> SELECT * FROM large_table WHERE id BETWEEN 1 AND 10000;
    
    Then export the results.
  2. Use Native Database Tools For very large exports, use database-specific tools:
    # SQLite
    sqlite3 mydb.db ".mode csv" ".output data.csv" "SELECT * FROM table;"
    
    # PostgreSQL
    psql -d mydb -c "COPY table TO '/tmp/data.csv' CSV HEADER;"
    
    # MySQL
    mysql -e "SELECT * FROM table INTO OUTFILE '/tmp/data.csv'"
    

Getting Help

If you’re still experiencing issues:
Report Issues: Open an issue on GitHub with:
  • Error message (full text)
  • Queryly version
  • Operating system
  • Database type and version
  • Steps to reproduce
Community Support: Connect with other users:
  • GitHub Discussions
  • Stack Overflow (tag: queryly)
Check Logs: Enable verbose logging if available to see detailed error information.

Next Steps

Build docs developers (and LLMs) love