This topic describes the solutions to failures to add credentials to the password box. Such failures include the failure to add an OceanBase credential and the failure to add a host credential.
Failed to add an OceanBase credential
Symptom
The OceanBase credential failed to be added to the password box.
Possible causes
The status of the OceanBase cluster is abnormal.
The default SQL port 2881 of the OceanBase host is not opened.
This user does not exist in the OceanBase cluster.
Solutions
When you try to add an OceanBase credential to the password box, the system performs a connection test. The OceanBase credential can be added to the password box when the test is passed. If you failed to add the OceanBase credential, perform the following steps to troubleshoot the problem.
Check whether the status of the OceanBase cluster is abnormal.
Run the MySQL command
mysql -h[ip] -P[port] -u[username] -p[password]by using a command-line tool on all OceanBase Cloud Platform (OCP) nodes to test whether they can be connected to the OceanBase host. If a node failed the connection test, check whether the default SQL port 2881 of the OceanBase host is opened.Check whether this user exists in the OceanBase Database. If not, add this database user in OceanBase Database. Perform the following steps to add the database user:
Log on to the OCP console.
In the left-side navigation pane, click Tenants . The Tenant Overview page appears.
Find the target tenant in the Tenants list, and click the tenant name. The Overview page of the tenant appears.
In the left-side navigation pane, click User Management . The User Management page appears.
In the upper-right corner, click Create User .
For more information, see User management under a MySQL tenant or Create a user under an Oracle tenant.
Contact OceanBase Technical Support.
Failed to add a host credential
Symptom
The host credential failed to be added to the password box.
Possible causes
The user is not granted the sudo permissions.
The private key of the credential is incorrect.
The sshd_config and ssh_config parameters of the host are incorrectly configured.
Solutions
The failure to add a host credential generally occurs when the host failed to be connected over SSH.
Check whether the user is granted the sudo permissions.
Check whether the setting
username ALL=(ALL) NOPASSWD:ALLis added to the /etc/sudoers file to allow the user to run sudo commands without a password.Notice
The setting
username ALL=(ALL) NOPASSWD:ALLmust be added to /etc/sudoers after the permission configuration for the user group of this user is completed. Otherwise, the setting is invalid. Run thegroups usernamecommand to query the user group of this user.Check whether
Defaults requirettyandDefault !visiblepwin the /etc/sudoers file are commented out.
Check whether the entered key is a private key. A private key usually starts with BEGIN RSA PRIVATE KEY. Do not enter a public key.
Ensure that the host credential is correct.
Use a command-line tool to connect the OCP host to the host to which the credential is to be added. If the error message "algorithm negotiation fail" is returned, check the
/etc/ssh/sshd_configsetting of the user and ensure that the sshd_config and ssh_config parameters of the host to which the credential is be added are correctly configured.