PostgreSQL Serverless
Powered by Neon. Autoscaling, serverless PostgreSQL with pgbouncer connection pooling. Recommended for most projects.
MySQL
Traditional managed MySQL with autoscaling compute and storage. Requires enabling public endpoint for external access.
Prerequisites
- A Laravel Cloud account with a database resource created
- A VexiData account
Connect Laravel Cloud to VexiData
Get your database credentials
- Log in to your Laravel Cloud Dashboard
- Navigate to your Organization > Resources > Databases
- Click the … menu next to your database
- Select View credentials
Enable public endpoint (MySQL only)
PostgreSQL Serverless databases are publicly accessible by default. For MySQL databases, you need to enable external access first:
- Click the … menu next to your MySQL database
- Select Edit settings
- Toggle Enable public endpoint on
- Save your changes
If you’re connecting a PostgreSQL Serverless database, skip this step — it’s already accessible externally.
Choose your connection endpoint (PostgreSQL only)
Laravel Cloud PostgreSQL provides two connection endpoints:
To get the pooler endpoint, append
| Pooler Endpoint | Standard Endpoint | |
|---|---|---|
| Host | ep-[name]-pooler.[region].pg.laravel.cloud | ep-[name].[region].pg.laravel.cloud |
| Port | 5432 | 5432 |
| Best for | Short-lived, on-demand connections | Persistent, long-running connections |
| How to identify | Host contains -pooler | Host does not contain -pooler |
-pooler to the first segment of the hostname:Add the connection in VexiData
- Go to Data Sources in VexiData
- Click PostgreSQL or MySQL depending on your database type
- Fill in the details from your Laravel Cloud credentials:
| Field | Value |
|---|---|
| Display Name | A name to identify this connection (e.g., “Laravel Cloud Production”) |
| Host | ep-[name]-pooler.[region].pg.laravel.cloud |
| Port | 5432 |
| Database | Your database name |
| Schema | public (default — change if your tables are in a different schema) |
| Username | Your database username |
| Password | Your database password |
| Field | Value |
|---|---|
| Display Name | A name to identify this connection (e.g., “Laravel Cloud Production”) |
| Host | Your MySQL hostname from credentials |
| Port | 3306 |
| Database | Your database name |
| Username | Your database username |
| Password | Your database password |
Troubleshooting
Connection timed out
Connection timed out
- MySQL: Make sure you’ve enabled the public endpoint in your database settings. This is disabled by default
- PostgreSQL: Serverless databases hibernate when idle. The first connection after hibernation may take a few seconds — try again if it times out
- Verify that the host and port are correct in your VexiData connection form
Authentication failed
Authentication failed
- Double-check your credentials by viewing them again in Laravel Cloud (Resources > Databases > … > View credentials)
- Make sure you’re not using the auto-injected environment variables (e.g.,
DB_HOST) — these are for apps running on Laravel Cloud, not for external connections. Use the credentials from the View credentials dialog
No tables visible after connecting
No tables visible after connecting
- Confirm your tables are in the
publicschema (PostgreSQL) or the correct database (MySQL). If they’re in a custom schema, update the Schema field in VexiData - Check that your database user has
SELECTpermissions on the tables you want to query
PostgreSQL: Too many connections
PostgreSQL: Too many connections
- Switch to the pooler endpoint by adding
-poolerto the first segment of your hostname. The pooler supports up to 10,000 concurrent connections via pgbouncer