Database Services
Database Services
Ploi Cloud makes it easy to add database services to your applications. Supported databases include MySQL, PostgreSQL, and MongoDB.
Adding a Database
Navigate to your application
Click "Add Service"
Select your database type
Choose a database version:
MySQL: 8.0, 5.7
PostgreSQL: 16, 15, 14, 13
MongoDB: 7.0, 6.0, 5.0
Configure the resources:
CPU: Select from available plans
Memory: Automatically allocated (4GB per CPU core)
Storage Size: Set during creation (cannot be changed later)
Click "Create database"
Connection Details
Database credentials are automatically generated and injected as environment variables into your application:
MySQL
For Laravel applications:
DB_CONNECTION
- Set to 'mysql'DB_HOST
- Database hostnameDB_PORT
- Port 3306DB_DATABASE
- Database nameDB_USERNAME
- Database usernameDB_PASSWORD
- Database password
For WordPress applications:
WORDPRESS_DB_HOST
- Database hostnameWORDPRESS_DB_NAME
- Database nameWORDPRESS_DB_USER
- Database usernameWORDPRESS_DB_PASSWORD
- Database password
PostgreSQL
DB_CONNECTION
- Set to 'pgsql'DB_HOST
/POSTGRES_HOST
- Database hostnameDB_PORT
/POSTGRES_PORT
- Port 5432DB_DATABASE
/POSTGRES_DB
- Database nameDB_USERNAME
/POSTGRES_USER
- Database usernameDB_PASSWORD
/POSTGRES_PASSWORD
- Database passwordPOSTGRESQL_URL
/POSTGRES_URL
- Full connection string
MongoDB
MONGODB_URI
- Full connection string with authenticationMONGODB_HOST
- Database hostnameMONGODB_PORT
- Port 27017MONGODB_DATABASE
- Database nameMONGODB_USERNAME
- Database usernameMONGODB_PASSWORD
- Database password
Backups
The platform performs automatic nightly backups of all applications and their databases. Backups can be restored to create a new copy of your application with all its data.
Managing Databases
To manage your database:
Go to the service in your application
View service logs to monitor database activity
Restart the service if needed
Enable debug access for temporary external connections
Note: Storage size cannot be changed after creation. Plan your storage needs accordingly.