Skip to main content

init

Connecting to your own MySQL database

Through connection configuration, you can integrate your own MySQL database into the CloudBase platform to achieve:

  • Generating a data model based on existing data tables
  • Using the model operation capabilities provided by Cloud Development
  • Directly manage data in the original database

Database Connection Page

Prerequisites

Before configuring the connection to your own MySQL database, ensure that:

  • The database has public network access capability
  • A dedicated database user account has been created.
  • The database firewall has opened the corresponding port(s).

Create a Connection Configuration

Create an Access Point

  • Database Configuration Management page
  • Configuration options when creating a data model

Configure Parameters

Prerequisites

| :------- | :-------------------------------------------------------------------------------- | :------- | | Configuration Name | The display name for the connection configuration | Yes | | Configuration ID | The unique identifier for the connection configuration | Yes | | Host Address | Public IP address or domain name of the MySQL database | Yes | | Port | Connection port for the MySQL database | Yes | | Database Name | The name of the database to connect to | Yes | | Username | Database connection username | Yes | | Password | Database connection password | Yes | | Connection Parameters | MySQL Connection Parameters | No | | Timeout | Timeout period for connection and access | No |

IP Allowlist Configuration

⚠️ Note: To ensure database connection security, you must correctly configure the IP allowlist.

Please add the following IP addresses to your MySQL database allowlist:

175.24.211.44, 
175.24.212.162, 
175.24.213.48, 
175.24.214.104, 
175.24.214.93, 
49.234.25.245, 
49.234.27.58, 
49.234.3.160, 
49.234.34.31, 
49.234.35.33,
Note

You must add all IP addresses to ensure the service runs normally.

Connection Configuration Management

Usage Limits

  1. Connection configuration used by the data model:

    • Must not be deleted
    • Must not be modified
  2. If you need to modify the configuration:

    • Create a new connection configuration
    • Delete the existing data model
    • Recreate the data model using the new configuration
    • Delete the old connection configuration

Best Practices

  1. Permission Management: Create a dedicated database account and grant only necessary permissions (SELECT, INSERT, UPDATE, DELETE).
  2. Security Configuration: Regularly update the allowlist configuration to ensure security.
  3. Performance Optimization: Use appropriate connection parameters to optimize performance, such as setting the connection pool size.
  4. Timeout Settings: Set a reasonable timeout (30-60 seconds recommended) to prevent connection hangs.