Create remote MySQL profile

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

SecurityBasicAuth
Request
query Parameters
required
string or string

The MySQL server's IP address or hostname.

Example: mysql_host=192.168.0.1
mysql_pass
required
string

The MySQL server's password.

Example: mysql_pass=12345luggage
mysql_port
required
integer [ 1 .. 65535 ]

The MySQL server's port.

Example: mysql_port=3306
mysql_user
required
string

The MySQL server's username.

Example: mysql_user=username
name
required
string

The new profile's name.

Example: name=MyProfile
cpcloud
integer
Default: 0

Whether the remote database profile is a cPanel Cloud deployment.

  • 1 — Is cPanel Cloud.
  • 0Not cPanel Cloud.
Example: cpcloud=1
setup_via
string <= 255 characters

A description of the profile data.

Note:

This parameter defaults to User provided MySQL credentials.

Example: setup_via=Main terminal
Responses
200

HTTP Request was successful.

Response Schema: application/json
object
object
get/remote_mysql_create_profile
Request samples
whmapi1 --output=jsonpretty \
  remote_mysql_create_profile \
  name='MyProfile' \
  mysql_host='192.168.0.1' \
  mysql_user='username' \
  mysql_pass='12345luggage' \
  mysql_port='3306'
Response samples
application/json
{
  • "data": {
    • "profile_details": {
      • "active": 0,
      • "cpcloud": 0,
      • "mysql_host": "192.168.0.1",
      • "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
    }
}