# Error adding mysql:queries service

**URL:** https://forums.percona.com/t/error-adding-mysql-queries-service/6150
**Category:** PMM 1.x
**Created:** [January 24, 2018, 11:53am UTC](https://forums.percona.com/t/error-adding-mysql-queries-service/6150 "2018-01-24T11:53:41Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![jorge](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/jorge/32/1209_2.png) [@jorge](https://forums.percona.com/u/jorge)
#### Post date: [January 24, 2018, 11:53am UTC](https://forums.percona.com/t/error-adding-mysql-queries-service/6150/1 "2018-01-24T11:53:41Z")

</div>

I get an error every time I try to add the mysql:queries service, after executing with root access this:

pmm-admin add mysql:queries --user mysqluser --password mysqlpassword --query-source perfschema

I get this error:

Error adding MySQL queries: PUT [http://username](http://username):password@serverIP/qan-api/instances/88f67174438f82f821b55b879de1355966d: API returned HTTP status code 409, expected 204

pmm-admin check-network shows everything ok

The linux:metrics and mysql:metrics services work fine. I’m running MySQL 5.7.20 on a Ubuntu 16.04 server. pmm-client and server version 1.6

Any help would be greatly appreciated

---

<div class="post-metadata">

### Author: ![baasp](https://avatars.discourse-cdn.com/v4/letter/b/eada6e/32.png) [@baasp](https://forums.percona.com/u/baasp)
#### Post date: [January 25, 2018, 2:39pm UTC](https://forums.percona.com/t/error-adding-mysql-queries-service/6150/2 "2018-01-25T14:39:51Z")

</div>

Are U sure that port 80 from the agent server to the PMM server is is open?

telnet serverIP 80

shows what?

Also I successfully have used since I have multiple servers being monitored.

pmm-admin add mysql:metrics SERVICENAME --user pmm\_admin --password PASSWORD --host serverIP  
pmm-admin add mysql:queries SERVICENAME --query-source perfschema --user pmm\_admin --password PASSWORD --host serverIP

pmm\_admin was created manually by me as I do not have root on the agent server and so just created a service account.

In MySQL:

CREATE USER IF NOT EXISTS ‘pmm\_admin’@‘%’ IDENTIFIED BY ‘PASSWORD’ PASSWORD EXPIRE NEVER ;  
GRANT ALL PRIVILEGES ON _._ TO ‘pmm\_admin’@‘%’ WITH GRANT OPTION;  
EXIT;

Good Luck
