Skip to main content
Laravel Cloud supports two database types:

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

Connect Laravel Cloud to VexiData

1

Get your database credentials

  1. Log in to your Laravel Cloud Dashboard
  2. Navigate to your Organization > Resources > Databases
  3. Click the menu next to your database
  4. Select View credentials
You’ll see the connection details including host, port, username, password, and database name.
2

Enable public endpoint (MySQL only)

PostgreSQL Serverless databases are publicly accessible by default. For MySQL databases, you need to enable external access first:
  1. Click the menu next to your MySQL database
  2. Select Edit settings
  3. Toggle Enable public endpoint on
  4. Save your changes
If you’re connecting a PostgreSQL Serverless database, skip this step — it’s already accessible externally.
3

Choose your connection endpoint (PostgreSQL only)

Laravel Cloud PostgreSQL provides two connection endpoints:
Pooler EndpointStandard Endpoint
Hostep-[name]-pooler.[region].pg.laravel.cloudep-[name].[region].pg.laravel.cloud
Port54325432
Best forShort-lived, on-demand connectionsPersistent, long-running connections
How to identifyHost contains -poolerHost does not contain -pooler
To get the pooler endpoint, append -pooler to the first segment of the hostname:
Standard:  ep-frosty-shadow-a57j6ubb.us-east-2.pg.laravel.cloud
Pooler:    ep-frosty-shadow-a57j6ubb-pooler.us-east-2.pg.laravel.cloud
For VexiData, we recommend the Pooler Endpoint. VexiData connects on-demand when running queries, so the pooler (pgbouncer) provides better performance and handles connection limits more efficiently.
4

Add the connection in VexiData

  1. Go to Data Sources in VexiData
  2. Click PostgreSQL or MySQL depending on your database type
  3. Fill in the details from your Laravel Cloud credentials:
For PostgreSQL Serverless:
FieldValue
Display NameA name to identify this connection (e.g., “Laravel Cloud Production”)
Hostep-[name]-pooler.[region].pg.laravel.cloud
Port5432
DatabaseYour database name
Schemapublic (default — change if your tables are in a different schema)
UsernameYour database username
PasswordYour database password
For MySQL:
FieldValue
Display NameA name to identify this connection (e.g., “Laravel Cloud Production”)
HostYour MySQL hostname from credentials
Port3306
DatabaseYour database name
UsernameYour database username
PasswordYour database password
5

Test and save

Click Test & Save Connection. VexiData will verify it can reach your database. Once connected, your schema will be analyzed automatically.

Troubleshooting

  • 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
  • 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
  • Confirm your tables are in the public schema (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 SELECT permissions on the tables you want to query
  • Switch to the pooler endpoint by adding -pooler to the first segment of your hostname. The pooler supports up to 10,000 concurrent connections via pgbouncer