Jkk

SHOSA- Great Sharamites....

Jkk
By Moses Erhinyodavwe March 09, 2025 2 Comments

Jkk

 

Introduction

Laravel Cloud allows you to create MySQL and Serverless Postgres databases and attach them to your application’s environments directly from the Laravel Cloud dashboard.

 
 

Laravel Serverless Postgres

 

 Powered by Neon

 

Laravel Serverless Postgres provides a full-managed, autoscaling and serverless Postgres database for your application. Serverless Postgres databases autoscale their compute resources and storage to automatically accommodate the demand from your application.

To attach a Serverless Postgres database to an environment, click “Add database” on your environment’s infrastructure canvas dashboard. When adding a database to an environment, Laravel Cloud will prompt you to select the database you would like to attach to the environment or to create a new database cluster. When creating a new cluster, select “Laravel Serverless Postgres” as your database cluster type.

 
 

Once the database has been attached to an environment, you will need to re-deploy the environment in order for the changes to take effect.

Compute Units

When creating a Laravel Serverless Postgres database cluster, you may configure the range of “compute units” your cluster should scale between based on demand. Compute units correspond to the following vCPU / RAM configurations:

Compute Units vCPUs RAM
.25 .25 1 GB
.5 .5 2 GB
1 1 4 GB
2 2 8 GB
2 2 8 GB
3 3 12 GB
4 4 16 GB

Connection Pooler

Laravel Serverless Postgres offers connection pooling via pgbouncer, enabling up to 10,000 concurrent connections to your cluster.

To connect to the pgbouncer endpoint of your database cluster, append -pooler to the first segment of the cluster’s host name. For example, if your database cluster’s host name is ep-frosty-shadow-a57j6ubb.us-east-2.pg.laravel.cloud, the corresponding pgbouncer endpoint is ep-frosty-shadow-a57j6ubb-pooler.us-east-2.pg.laravel.cloud.

Then, add the new host name as the DB_HOST environment variable in your environment’s General Settings:

DB_HOST="frosty-shadow-a57j6ubb-pooler.us-east-2.pg.laravel.cloud"

Hibernation

Laravel Serverless Postgres databases may be configured to automatically hibernate after not receiving any incoming database queries for a given number of seconds. When a Serverless Postgres database is hibernating, you will not be billed for its compute resources.

If the database receives an incoming query while it is hibernating, the database will automatically wake up within a few hundred milliseconds.

 
 

Autoscaling Compute

Serverless compute can autoscale up and down based on your database cluster’s utilization. Set a minimum and maximum range and only pay for the compute resources you actually need.

 
 

Laravel MySQL

 
Laravel MySQL is currently in developer preview. It is currently only recommended for use in non-production environments. Learn more below.

Laravel MySQL provides a fully-managed MySQL database for your application. Laravel MySQL databases are assigned a fixed compute and storage size, but can be scaled at any time. Laravel MySQL databases do not currently support hibernation.

To attach a Laravel MySQL database to an environment, click “Add database” on your environment’s infrastructure canvas dashboard. When adding a database to an environment, Laravel Cloud will prompt you to select the database you would like to attach to the environment or to create a new database cluster. When creating a new cluster, select “Laravel MySQL” as your database cluster type.

 
 

Once the database has been attached to an environment, you will need to re-deploy the environment in order for the changes to take effect.

Visit the pricing docs for information on compute and storage prices by region.

 
MySQL databases can only be attached to compute clusters in the same region.

Developer Preview

Laravel MySQL databases are currently available as a developer preview and will be tagged as generally available in the coming weeks. Below is an up-to-date list of Laravel MySQL’s current capabilities and what is coming soon. You can also check our Changelog for updates.

What’s currently available

 Provisioning MySQL databases in all regions

 Edit cluster to increase storage capacity

 Edit cluster to increase or decrease instance size

 Connect to your database externally

 Backup snapshots taken every 24 hours and stored for 7 days

 Point-in-time recovery logs are being continuously backed up and stored for 7 days

What’s in development for GA

 Download a snapshot

 Take a manual snapshot

 Create a new cluster from a point-in-time or snapshot

Database Clusters vs. Databases

When creating a new database cluster, you will be asked to provide the desired name of the cluster and the desired name of the initial “database” that will be created within the cluster. Each database cluster can have as many databases as needed within the cluster. In web development, these databases are sometimes referred to as “schemas”.

When attaching a database cluster to an environment, you will actually be selecting a particular database within the cluster that you would like to make available to the environment via the DB_DATABASE environment variable used by Laravel.

Connecting to Database Clusters

From Your Application

When a database is attached to an environment, Laravel Cloud will automatically inject the environment variables needed by the Laravel application to connect to the database, including the DB_HOSTDB_USERNAMEDB_PASSWORD, and DB_DATABASE variables. You may view these environment variables in your environment’s General Settings.

From Your Local Machine

To connect to your database from your local machine using a database management client like TablePlus, navigate to your organization’s “Resources” page and click the ”…” icon next to an available database. Then, click “View credentials”.

 
 

The database credentials modal window will provide you with the credentials needed to connect to your database, in addition to a “DeepLink” which will open your database in your local machine’s default database management client if you have one installed.

Comments (2)

Login to post a comment.

Moses Erhinyodavwe

7 months ago

Comere

Moses Erhinyodavwe

7 months ago

gdg

About SHOSA

Sharam Old Students Association (SHOSA) connects alumni across generations, fostering fellowship and supporting our alma mater's development through various initiatives and events.

Quick Links

Contact

  • Sharam Old Students Association
  • +123 456 7890
  • info@shosa.org

Newsletter

Subscribe to our newsletter for updates on events and news.

logo

© SHOSA 2025 | All Rights Reserved | Designed with for Sacred Heart Alumni