Using proxysql-admin --syncusers with more than one admin user add the user to mysql_users

Description

Running the proxysql-admin --syncusers with more than one admin user creates the remaining one on mysql_users:

MySQL [(none)]> show global variables; +----------------------------------------------------------------------+-----------------------------+ | Variable_name                                                        | Value                       | +----------------------------------------------------------------------+-----------------------------+ | admin-admin_credentials                                              | admin:admin;radmin:radmin   | [...] +----------------------------------------------------------------------+-----------------------------+

Running the syncusers:

# proxysql-admin --config-file=/etc/proxysql-admin.cnf --syncusers Syncing user accounts from PXC(10.124.33.21:3306) to ProxySQL Adding user to ProxySQL: radmin Removing existing user from ProxySQL: root Adding user to ProxySQL: root Removing existing user from ProxySQL: root Adding user to ProxySQL: root Synced PXC users to the ProxySQL database!

Once the admin is created on mysql_users, it cannot access proxysql again:

2024-02-09 00:24:17 MySQL_Session.cpp:5682:handler___status_CONNECTING_CLIENT___STATE_SERVER_HANDSHAKE(): [ERROR] ProxySQL Error: Access denied for user 'radmin'@'10.124.33.159' (using password: YES)

Due to the following:

Users defined in admin-admin_credentials or admin-stats_credentials cannot be used also in mysql_users table.

https://proxysql.com/Documentation/global-variables/admin-variables/#admin-admin_credentials:~:text=users%20defined%20in%20admin%2Dadmin_credentials%20or%20admin%2Dstats_credentials%20cannot%20be%20used%20also%20in%20mysql_users%20table.

Environment

None

AFFECTED CS IDs

CS0043736

Activity

Show:
Done

Details

Assignee

Reporter

Fix versions

Affects versions

Priority

Smart Checklist

Created February 9, 2024 at 12:57 AM
Updated March 6, 2024 at 5:23 PM
Resolved February 20, 2024 at 11:08 AM