ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

Authentication plugin 'caching_sha2_password' reported error: Authentication requires secure connection

book

Article ID: 226270

calendar_today

Updated On:

Products

CA API Gateway

Issue/Introduction

While confirming the repluser can login to the database, the following error occurs:

[[email protected] bin]#mysql -h apigw-02.server.net -u repluser -p
Enter password:
ERROR 2061 (HY000): Authentication plugin 'caching_sha2_password' reported error: Authentication requires secure connection.

Cause

The cause has not been determine but the issue has something to do with the creation of the repluser.

Environment

API Gateway 10.0

Resolution

On the server where the repluser login is failing, do the following:

1. Remove the repluser
    drop user 'repluser'@'HOSTNAME';
    flush privileges;

2. Confirm the repluser has been dropped
    select user from mysql.user;

3. Manually create the user with the hostname and IP address
    create user 'repluser'@'HOSTNAME' identified with mysql_native_password by 'PASSWORD';
    create user 'repluser'@'IP' identified with mysql_native_password by 'PASSWORD';
    GRANT REPLICATION SLAVE, REPLICATION CLIENT, SELECT, LOCK TABLES, RELOAD ON *.* TO 'repluser'@'HOSTNAME';
    GRANT REPLICATION SLAVE, REPLICATION CLIENT, SELECT, LOCK TABLES, RELOAD ON *.* TO 'repluser'@'IP';
    flush privileges;

4. Confirm you can log in to MySQL witrh the repluser
    mysql -u repluser -p -h HOSTNAME
  
Next, set up replication following the steps in the KB 44402 under Gateway 10.x process - start with step #2