Error Import all mysql users to proxysql - replication group

I’m getting error when importing mysql users into proxysql, I’m running it like this in proxysql-admin:

getting the following errors:

ERROR (line:620) : The cluster (with writer hostgroup:10) has not been configured in ProxySQL

Enter ProxySQL password:
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that matches your MySQL server version for the right syntax to use near ‘SAVE MYSQL SERVERS FROM RUNTIME’ at line 1
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that matches your MySQL server version for the right syntax to use near ‘SAVE MYSQL QUERY RULES FROM RUNTIME’ at line 1
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that matches your MySQL server version for the right syntax to use near ‘SAVE MYSQL USERS FROM RUNTIME’ at line 1
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that matches your MySQL server version for the right syntax to use near ‘SAVE MYSQL VARIABLES FROM RUNTIME’ at line 1
ERROR 1046 (3D000) at line 1: No database selected
ERROR (line:614) : Guys hostgroup retrieval failed.
– Please check the ProxySQL connection parameters and status.

my hostgroups are configured as follows:

image

I tried to change the settings in the proxysql-admin.cnf file without getting success, getting the same error.

Could you help me I’m a newbie and I’m having this difficulty.

1 Like

Hi, can you share what is the command you are using to export/import the users?

1 Like

The command used is:

proxysql-admin --proxysql-username = myuser --proxysql-password = mypass --proxysql-port = myport --proxysql-hostname = myhost --syncusers

Presented new error:

ERROR 1045 (28000): Access denied for user ‘sbuser’ @ ‘host’ (using password: YES)
ERROR (line: 568): ProxySQL connection verification failed.

  • Unable to connect to ProxySQL on host
  • Check ProxySQL connection parameters and status.
1 Like

From the error it seems the user you are specifying in --proxysql-username is not able to connect to ProxySQL admin interface. Double check the hostname, password and proxysql port arguments (you need to use the admin interface port, default 6032)

1 Like

Hello I’m trying to create this user and I’m having difficulties, could you guide me? how to create admin user in proxysql, since the users I create within proxysql can only access port 6063

1 Like

Try the following:

set admin-admin_credentials='admin:admin;myuser:mypwd';
LOAD ADMIN VARIABLES TO RUNTIME;
SAVE ADMIN VARIABLES TO DISK;

then you can connect with myuser from anywhere on the proxy admin port.

1 Like