Database FAQs
Check out frequently asked questions from users about the WhaTap database monitoring service.
Authentication plugin 'caching_sha2_password' cannot be loaded error
When I checked the dbx.log while connecting to the DB after installing the agent, the error,
Authentication plugin 'caching_sha2_password' cannot be loaded
occurred. What should I do?
This can happen when you use MySQL 8.0. The default authentication plugin for MySql 8.0 is caching_sha2_password
. To use caching_sha2_password
, use the SSL-secured connection or unencrypted connection with the RSA security applied. The easiest way to solve this problem is to use the previous mysql_native_password
method when generating the password, as follows:
ALTER USER 'yourusername' IDENTIFIED WITH mysql_native_password BY 'youpassword';
See the following.
- 2.11.4 Changes in MySQL 8.0 - https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html
- 6.4.1.2 Caching SHA-2 Pluggable Authentication - https://dev.mysql.com/doc/refman/8.0/en/caching-sha2-pluggable-authentication.html
JAVA command not found error
If you run
startd.sh
when starting the agent, theJava command not found
error occurs. How can this error be fixed?
This error occurs only when Java 1.8 or later has been installed to run the DB agent. In order to run the agent, Java 1.8 or later must have been installed. Under Java installation after checking the environment, the agent can be run normally.
Through the following command, check the current Java version.
java -version
See the following.
- Java installation and configuration - https://www.oracle.com/java/technologies/javase-jdk8-downloads.html
Collecting resource data for DB monitoring
Resource metrics such as CPU and memory are not visible in the DB monitoring.
There are different methods for collecting resource data from the DB server depending on the environment.
- DB Agent Environment: Installing the XOS modules on the DB local server is required to collect resource data.
For detailed configuration instructions, see the document for the platform that matches your DB agent environment.
- RDS Environment: Because RDS cannot be installed on a local server, you can collect related metrics by linking with the AWS CloudWatch.
For detailed configuration instructions, see the document for the platform that matches your RDS environment.
In case monitoring is not possible after creating an additional database in the DB instance
I created an additional database in the DB instance, but it was not monitored by WhaTap. What should I do?
The agent collects DB data upon startup and once a day after startup. If a DB has been additionally created while the agent is running, it may not be reflected. In this case, restart the agent. If that does not work, you may not have proper permissions. Grant permission as follows:
grant select on 'added DB' to whatap;
Based on the instance list of M, S, and C
What is the criteria for M, S, C in the instance list?
They mean Master, Slave, and Cluster respectively. They appear in case of a DB built by replication. Cluster appears when MariaDB has been configured as a galera solution.
-- In case of Cluster: WSREP_ON is not ON and WSREP_CLUSTER_NAME is galera
select variable_name,variable_value
from information_schema.global_variables
where variable_name in ('wsrep_on','wsrep_cluster_name');
-- In case of Master: The data for show slave hosts exists
show slave hosts ;
-- In case of Slave: The data for show slave status exists
show slave status ;
Instance list, M is not displayed
I can't see M in the instance list even though it is Master. What's the reason?
If you have no permission for replication, it may not appear. Please check your monitoring account privileges.
--Permission checking
show grants for whatap;
--Granting permissions
grant REPLICATION SLAVE, REPLICATION CLIENT on *.* to whatap;
Metalock Monitoring
Metalocks (locks obtained when changing the names or structures of database objects) cannot be viewed in the lock tree of MySQL. How can I monitor metalocks as well?
DB and WhaTap agent configurations are required.
DB Configuration
# 1. Enable the Performance_schema
performance_schema = on
# 2. Enabling setup_consumers: As a result of the query below, ENABLED must be `YES` (default value is `YES` from 8.0)
SELECT *
FROM performance_schema.setup_instruments
WHERE NAME = 'wait/lock/metadata/sql/mdl';
-- If ENABLED is `NO`, update is required.
UPDATE setup_instruments
SET ENABLED = 'YES',TIMED='YES'
WHERE NAME = 'wait/lock/metadata/sql/mdl';
WhaTap DB Agent Configuration
# Add the following setting in whatap.conf
metalock=1
Accessing the Log menu
The Log menu is invisible in the project.
Check the specified member roles. Log and submenus are exposed only to the members with the View log role. The members with this role can enter the menu and view the logs.
For more information about the member role scheme, see the following.