Home » AI Databases » Security

How to Secure Your Database Connection

Securing your database connection means using the right credentials, limiting permissions, encrypting data in transit, and restricting network access. Create a dedicated database user with only the permissions needed, use SSL for all connections, and limit which IP addresses can reach your database server. These steps protect your data while still allowing the AI SQL assistant to work effectively.

Use a Dedicated Database User

Never connect the AI platform using your database root account or admin credentials. Create a dedicated user specifically for the AI connection with only the permissions it needs:

In MySQL, create a dedicated user with: CREATE USER 'aiplatform'@'%' IDENTIFIED BY 'strongpassword'; GRANT SELECT ON mydatabase.products TO 'aiplatform'@'%';

In PostgreSQL: CREATE USER aiplatform WITH PASSWORD 'strongpassword'; GRANT SELECT ON ALL TABLES IN SCHEMA public TO aiplatform;

Use SSL Encryption

All connections between the platform and your database should use SSL/TLS encryption. This prevents anyone intercepting network traffic from seeing your queries or data. Most managed database providers (AWS RDS, Supabase, Neon, PlanetScale) enable SSL by default. The platform supports SSL connections for both MySQL and PostgreSQL.

If your database requires a specific CA certificate for SSL verification, you can upload it in the connection settings. For AWS RDS, Amazon provides the RDS CA bundle that you can download and use.

Restrict Network Access

Your database should not accept connections from any IP address on the internet. Restrict inbound access to only the IP addresses that need to connect:

What the AI Can and Cannot See

The AI SQL assistant can only see tables and columns that the connected database user has permission to access. If you restrict the user to certain tables, the AI's schema scan will only show those tables. It cannot access, query, or even know about tables outside its permissions.

Your database credentials are stored encrypted in your account and are used only to establish the database connection. They are not shared with other users, used for any other purpose, or accessible through the platform's API.

Query results and schema information are used within your session only. The platform does not store copies of your database data, cache query results beyond the current session, or use your data to train AI models.

Additional Security Measures

NoSQL security: The platform's built-in NoSQL database is secured automatically through your account authentication. API calls require your API key, and data is isolated by account. You do not need to configure network access, SSL, or user permissions separately for NoSQL.

Connect your database securely and start querying with AI. Full control over permissions and access.

Get Started Free