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.

Reset MySQL password for gateway user

book

Article ID: 237245

calendar_today

Updated On:

Products

CA API Gateway

Issue/Introduction

While trying to purge audits/logs from the staging API gateways, the connection to the MySQL database is failing with the default password. How do I reset the password for the "gateway" user?

Environment

API Gateway: 10.X

MySQL 8.X

Resolution

1. Stop the gateway service 

2. Access MySQL as root
[[email protected] ~]# mysql
mysql>
mysql>SET PASSWORD FOR 'gateway' = '7layer7';
mysql>SET PASSWORD FOR 'gateway'@'localhost' = '7layer7';
mysql>SET PASSWORD FOR 'gateway'@'localhost.localdomain' = '7layer7';
mysql>SET PASSWORD FOR 'gateway'@'localhost6' = '7layer7';
mysql>SET PASSWORD FOR 'gateway'@'localhost6.localdomain6' = '7layer7';
mysql>exit

3. From the ssgconfig menu:
Option 2 Display Layer7 API Gateway configuration menu
Option 3 Configure the Layer7 API Gateway
Option 1 Database connection
Accept all the default values - for the password field, enter the new password

S) Save and exit

4. Start the gateway services

Additional Information

MySQL 8.0 Documentation: 13.7.1.10 SET PASSWORD Statement