Create remote MySQL profile via SSH
This function uses SSH to create a profile to access a remote MySQL® server.
Query parameters
The MySQL server's IP address or hostname.
The new profile's name.
The SSH server's port.
The SSH username.
Whether the remote database profile is a cPanel Cloud deployment.
- 1 — Is cPanel Cloud.
- 0 — Not cPanel Cloud.
The SSH username's password.
Warning:
You must specify either the password or the sshkey_name parameter.
The escalation method to use to authenticate the account.
Warning:
This parameter is required if the user parameter's value is not root.
The MySQL server's root user's password.
Warning:
This parameter is required if the root_escalation_method parameter's value is su.
The name of the SSH key.
Warning:
You must specify either the password or the sshkey_name parameter.
The SSH key's passphrase.
Warning:
This parameter is required if the sshkey_name value is password-protected.
Response
HTTP Request was successful.
Example response
{
"data": {
"profile_details": {
"mysql_pass": "12345luggage",
"mysql_port": 3306,
"mysql_user": "username",
"setup_via": "Created via SSH"
},
"profile_saved": "MyProfileSSH"
},
"metadata": {
"command": "remote_mysql_create_profile_via_ssh",
"reason": "OK",
"result": 1,
"version": 1
}
}