latestOpenAPI 3.0.2cPanel License2026-08-106251554.3 MB

3da41671c02c

Databases
Remote MySQL Databases

Create remote MySQL profile

This function creates a profile to access a remote MySQL® server.

get/remote_mysql_create_profile

Query parameters

string ipv4 required
OR
string hostname required

The MySQL server's IP address or hostname.

mysql_passstring required
Example:12345luggage

The MySQL server's password.

mysql_portinteger required
Example:3306

The MySQL server's port.

mysql_userstring required
Example:username

The MySQL server's username.

namestring required
Example:MyProfile

The new profile's name.

cpcloudinteger
Example:1

Whether the remote database profile is a cPanel Cloud deployment.

  • 1 — Is cPanel Cloud.
  • 0Not cPanel Cloud.
setup_viastring
Example:Main terminal

A description of the profile data.

Note:

This parameter defaults to User provided MySQL credentials.

Response

HTTP Request was successful.

Example response

{
  "data": {
    "profile_details": {
      "mysql_pass": "12345luggage",
      "mysql_port": 3306,
      "mysql_user": "username",
      "setup_via": "Main terminal"
    },
    "profile_saved": "MyProfile"
  },
  "metadata": {
    "command": "remote_mysql_create_profile",
    "reason": "OK",
    "result": 1,
    "version": 1
  }
}