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.
Supported Databases
Section titled “Supported Databases”- PostgreSQL (v9.5+)
- MySQL (v5.7+)
- Supabase (PostgreSQL-based)
Connection Methods
Section titled “Connection Methods”Choose the method that matches your database hosting:
- Direct Cloud Connection: For databases on AWS, Google Cloud, Azure, or Supabase.
- Secure Bridge (VPN): For databases running on local office servers or personal computers.
🐘 PostgreSQL Setup
Section titled “🐘 PostgreSQL Setup”1. Create a Read-Only User
Section titled “1. Create a Read-Only User”Run these commands in your database to create a secure user for AnalytAI:
-- Create a dedicated userCREATE USER analytai_user WITH PASSWORD 'YourSecurePassword123!';
-- Grant accessGRANT 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 includedALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO analytai_user;2. Connection Details
Section titled “2. Connection Details”- Host: Your server address (e.g.,
db.example.comor VPN IP100.x.x.x) - Port:
5432 - User:
analytai_user - Database: Your database name
🐬 MySQL Setup
Section titled “🐬 MySQL Setup”1. Create a Read-Only User
Section titled “1. Create a Read-Only User”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;2. Connection Details
Section titled “2. Connection Details”- Host: Your server address or VPN IP
- Port:
3306 - User:
analytai_user - Database: Your database name
⚡ Supabase Setup
Section titled “⚡ Supabase Setup”Supabase is built on PostgreSQL. You will need your Session Pooler connection string.
- Go to Settings → Database in your Supabase Dashboard.
- Copy the Session Pooler connection string (Port 5432).
- It will look like this:
postgresql://postgres:[PASSWORD]@db.project.supabase.co:5432/postgres - Replace
[PASSWORD]with your actual database password and paste it into AnalytAI.
🛡️ Security Best Practices
Section titled “🛡️ Security Best Practices”- Read-Only Access: Always use a dedicated user with
SELECTpermissions 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.