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?
It can happen when using MySQL 8.0, and its default authentication plug-in is caching_sha2_password
. To use the caching_sha2_password
, use the SSL-secured connection or a non-encrypted connection with the RSA security applied. The easiest way to solve this problem is to use the mysql_native_password
when generating passwords 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
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.