search cancel

API Gateway: Cannot Create Database Connection to Azure MySQL

book

Article ID: 189206

calendar_today

Updated On:

Products

CA API Gateway API SECURITY STARTER PACK-7

Issue/Introduction

We are provisioning gateways in Azure using Azure MySQL PaaS.  We are able to connect to the database using: 

curl -v telnet://hostname.mysql.database.azure.com:3306 and

mysql -u [email protected] -h hostname.mysql.database.azure.com -p

However, we we try to create the database we are getting below error.  We are connecting to the database using admin account which has full permissions.

Error creating database when saving configuration 'Cannot create database: 'The connection string may not be right. Please visit portal for references.' [code:28,000, AUTHORIZATION_FAILURE]'

Environment

API Gateway: 9.2 CR10, 9.3 CR04, 9.4+
Database: Azure MySQL

Resolution

The gateway DB user needs to be '[email protected]' so it can connect to the Azure DB. Your DB connection details should look like the following:

Database Host = hostname.mysql.database.azure.com
Database Port = 3306 
Database Name = ssg 
Database Username = [email protected]
Administrative Database Username = [email protected]