# Not able to get database name of my node server mysql service

**URL:** <https://forums.percona.com/t/not-able-to-get-database-name-of-my-node-server-mysql-service/21678>\
**Category:** MySQL & MariaDB\
**Tags:** pmm, percona, new-release\
**Created:** [April 26, 2023, 10:35am UTC](https://forums.percona.com/t/not-able-to-get-database-name-of-my-node-server-mysql-service/21678 "2023-04-26T10:35:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ayushi-gupta](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/ayushi-gupta/32/10280_2.png) [@Ayushi-gupta](https://forums.percona.com/u/Ayushi-gupta)\
**Post date:** [April 26, 2023, 10:35am UTC](https://forums.percona.com/t/not-able-to-get-database-name-of-my-node-server-mysql-service/21678/1 "2023-04-26T10:35:24Z")

</div>

Hey everyone, I am running PMM-Server on EC2 Instance, using the pmm-server latest image. I am connected to pmm-server using pmm-agent and added MySQL service as well. But when I go to the PMM-Query analytics section, I do not get the username or database of my MySQL. It is giving me the n/A option and showing me a blank query.

 ![percona](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/2X/5/593146af117ccbc74d51fd7d64deca3cde4f3631.png)

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [April 26, 2023, 4:49pm UTC](https://forums.percona.com/t/not-able-to-get-database-name-of-my-node-server-mysql-service/21678/2 "2023-04-26T16:49:45Z")

</div>

Hello @Ayushi-gupta,  
Please provide the exact steps you took to add the MySQL server to PMM. Please include all command-line options that you used.

---

<div class="post-metadata">

**Author:** ![Ayushi-gupta](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/ayushi-gupta/32/10280_2.png) [@Ayushi-gupta](https://forums.percona.com/u/Ayushi-gupta)\
**Post date:** [April 27, 2023, 5:45am UTC](https://forums.percona.com/t/not-able-to-get-database-name-of-my-node-server-mysql-service/21678/3 "2023-04-27T05:45:57Z")

</div>

Thanks for answering @matthewb. To add a MySQL server to PMM, I followed the below docs.

> **[Running PMM with Docker on Ubuntu 20.04](https://percona.community/blog/2022/08/05/installing-pmm-with-docker-on-ubuntu-20/)**
>
> I started at Percona a few weeks ago and was looking for a quick way to learn about PMM (Percona Monitoring and Management), which is one of my favorite technologies within Percona to monitor the health of our database infrastructure, explore new...

In this:

1. Launched PMM server on ec2 instance with “latest” tag docker image.
2. Added pmm-client to pmm-server and my pmm-client is running on my local machine.

```auto
sudo pmm-admin config --server-insecure-tls --server-url=https://admin:admin@<public-ip-address-of-ec2-instance>:443

```

1. Created user inside MySQL and I am using MariaDB 10.9 version.

```auto
CREATE USER 'pmm'@'localhost' IDENTIFIED BY 'welcOme1!' WITH MAX_USER_CONNECTIONS 10;

```

```auto
GRANT SELECT, PROCESS, REPLICATION CLIENT, RELOAD ON *.* TO 'pmm'@'localhost';

```

```auto
exit

```

1. Added this user to pmm-client using the below command.

```auto
sudo pmm-admin add mysql --username=pmm --password=welcOme1! --query-source=perfschema

```

But when I am using

```auto
sudo pmm-admin add mysql --username=pmm --password=welcOme1! --query-source=slowlog

```

I am only able to see the ` database` name and it is showing me only one `database` name I have 10 databases in MySQL and am not able to see all the databases.

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [April 27, 2023, 12:54pm UTC](https://forums.percona.com/t/not-able-to-get-database-name-of-my-node-server-mysql-service/21678/4 "2023-04-27T12:54:16Z")

</div>

That all looks correct. Unfortunately, that also means you need to access the docker container and look at the logs for PMM and see if there are any errors. You can use `docker exec -it pmm-server /bin/bash` and then look in `/srv/logs` Read through some of the obvious logs like grafana.log, pmm.log, etc. See if there are any errors/warnings.
