After moving MySQL to an external database, creating a new Service on Red Hat 3scale API Management returns HTTP 500 (Internal Server Error)

Solution Verified - Updated -

Issue

I used mysqldump to get a copy of the database running in OpenShift, and after configuring the external MySQL server with the database backup, updated the secret with the Database url to point to the new server:

mysql2://<ADMIN USER>:<PASSWORD>@<HOST>/<DATABASE>

This appeared to work until we tried to add a service or credential, and I was getting HTTP 500 errors (both via API calls and admin ui).

I found the following message in the system-sphinx logs:

Exception -- Mysql2::Error: The user specified as a definer ('root'@'%') does not exist: INSERT INTO `audits` (`auditable_id`, `auditable_type`, `action`, `provider_id`, `kind`, `audited_changes`, `created_at`, `version`, `request_uuid`) VALUES (12345, 'Contract', 'update', 2, 'Cinstance', '---\nfirst_daily_traffic_at:\n- 2019-09-14 00:51:59 UTC\n- 2019-09-16 12:15:54 UTC\n', '2019-09-17 13:34:14', 10, '1234567890')

Environment

  • Red Hat 3scale API Management
    • 2.X On-premises

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content