Skip to content

SQL Database Connectors

AnalytAI enables you to connect to your existing SQL databases in minutes. Whether your data is in the cloud or on a local server, we provide secure methods to bring that data into AnalytAI for analysis.

  • PostgreSQL (v9.5+)
  • MySQL (v5.7+)
  • Supabase (PostgreSQL-based)

Choose the method that matches your database hosting:

  1. Direct Cloud Connection: For databases on AWS, Google Cloud, Azure, or Supabase.
  2. Secure Bridge (VPN): For databases running on local office servers or personal computers.

Run these commands in your database to create a secure user for AnalytAI:

-- Create a dedicated user
CREATE USER analytai_user WITH PASSWORD 'YourSecurePassword123!';
-- Grant access
GRANT CONNECT ON DATABASE your_database_name TO analytai_user;
GRANT USAGE ON SCHEMA public TO analytai_user;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO analytai_user;
-- Ensure future tables are included
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO analytai_user;
  • Host: Your server address (e.g., db.example.com or VPN IP 100.x.x.x)
  • Port: 5432
  • User: analytai_user
  • Database: Your database name

Run these commands in your MySQL terminal:

-- For Cloud/Remote (accessible from anywhere)
CREATE USER 'analytai_user'@'%' IDENTIFIED BY 'YourSecurePassword123!';
GRANT SELECT ON your_database_name.* TO 'analytai_user'@'%';
-- For Local VPN (more secure, allows all NetBird VPN IPs)
CREATE USER 'analytai_user'@'100.%' IDENTIFIED BY 'YourSecurePassword123!';
GRANT SELECT ON your_database_name.* TO 'analytai_user'@'100.%';
FLUSH PRIVILEGES;
  • Host: Your server address or VPN IP
  • Port: 3306
  • User: analytai_user
  • Database: Your database name

Supabase is built on PostgreSQL. You will need your Session Pooler connection string.

  1. Go to SettingsDatabase in your Supabase Dashboard.
  2. Copy the Session Pooler connection string (Port 5432).
  3. It will look like this: postgresql://postgres:[PASSWORD]@db.project.supabase.co:5432/postgres
  4. Replace [PASSWORD] with your actual database password and paste it into AnalytAI.

  • Read-Only Access: Always use a dedicated user with SELECT permissions only.
  • Secure Bridge: For any database not on the public internet, use our Secure Bridge (VPN) instead of opening firewall ports. This creates a private WireGuard mesh network between your machine and AnalytAI.
  • Encrypted Traffic: All connections between AnalytAI and your database are encrypted end-to-end via WireGuard.