# Error Import all mysql users to proxysql - replication group

**URL:** <https://forums.percona.com/t/error-import-all-mysql-users-to-proxysql-replication-group/12466>\
**Category:** ProxySQL\
**Tags:** mysql\
**Created:** [October 7, 2021, 7:41pm UTC](https://forums.percona.com/t/error-import-all-mysql-users-to-proxysql-replication-group/12466 "2021-10-07T19:41:44Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![rafaelcl14](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/rafaelcl14/32/5132_2.png) [@rafaelcl14](https://forums.percona.com/u/rafaelcl14)\
**Post date:** [October 7, 2021, 7:41pm UTC](https://forums.percona.com/t/error-import-all-mysql-users-to-proxysql-replication-group/12466/1 "2021-10-07T19:41:44Z")

</div>

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](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/2X/6/65346c9f1423c288d0d3e00000cfa859cae1eff3.png)

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.

---

<div class="post-metadata">

**Author:** ![Ivan\_Groenewold](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/ivan_groenewold/32/6299_2.png) [@Ivan\_Groenewold](https://forums.percona.com/u/Ivan_Groenewold)\
**Post date:** [October 8, 2021, 12:27pm UTC](https://forums.percona.com/t/error-import-all-mysql-users-to-proxysql-replication-group/12466/2 "2021-10-08T12:27:53Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![rafaelcl14](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/rafaelcl14/32/5132_2.png) [@rafaelcl14](https://forums.percona.com/u/rafaelcl14)\
**Post date:** [October 8, 2021, 12:54pm UTC](https://forums.percona.com/t/error-import-all-mysql-users-to-proxysql-replication-group/12466/3 "2021-10-08T12:54:06Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Ivan\_Groenewold](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/ivan_groenewold/32/6299_2.png) [@Ivan\_Groenewold](https://forums.percona.com/u/Ivan_Groenewold)\
**Post date:** [October 8, 2021, 1:24pm UTC](https://forums.percona.com/t/error-import-all-mysql-users-to-proxysql-replication-group/12466/4 "2021-10-08T13:24:22Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![rafaelcl14](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/rafaelcl14/32/5132_2.png) [@rafaelcl14](https://forums.percona.com/u/rafaelcl14)\
**Post date:** [October 14, 2021, 12:54pm UTC](https://forums.percona.com/t/error-import-all-mysql-users-to-proxysql-replication-group/12466/5 "2021-10-14T12:54:18Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Ivan\_Groenewold](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/ivan_groenewold/32/6299_2.png) [@Ivan\_Groenewold](https://forums.percona.com/u/Ivan_Groenewold)\
**Post date:** [October 14, 2021, 1:24pm UTC](https://forums.percona.com/t/error-import-all-mysql-users-to-proxysql-replication-group/12466/6 "2021-10-14T13:24:44Z")

</div>

Try the following:

```auto
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.
