# Connection to server via clients hostname

**URL:** <https://forums.percona.com/t/connection-to-server-via-clients-hostname/6639>\
**Category:** Percona Server for MySQL 5.7\
**Created:** [October 18, 2018, 1:00pm UTC](https://forums.percona.com/t/connection-to-server-via-clients-hostname/6639 "2018-10-18T13:00:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![UncertaintyP](https://avatars.discourse-cdn.com/v4/letter/u/b38774/32.png) [@UncertaintyP](https://forums.percona.com/u/UncertaintyP)\
**Post date:** [October 18, 2018, 1:00pm UTC](https://forums.percona.com/t/connection-to-server-via-clients-hostname/6639/1 "2018-10-18T13:00:09Z")

</div>

I am trying to setup a configuration to connect to a mysql server via the clients hostname.

On the server I have the following entry in mysql.user (user | host): webadmin | webadmin-1  
and the respective entry in /etc/hosts plus dnsmasq installed:

```auto

root&#64;mysqladmin-1:~# getent hosts webadmin-1
192.168.10.19 webadmin-1 webadmin-1
root&#64;mysqladmin-1:~# getent hosts 192.168.10.19
192.168.10.19 webadmin-1 webadmin-1
root&#64;mysqladmin-1:~# host 192.168.10.19
19.10.168.192.in-addr.arpa domain name pointer webadmin-1.

```

Connecting from the client results in the following error:

```auto
root&#64;webadmin-1:~# mysql -h mysqladmin-1 -u webadmin -p
Enter password:
ERROR 1130 (HY000): Host '192.168.10.19' is not allowed to connect to this MySQL server

```

but it works if changing the mysql.user entry (the host column) on the server to 192.168.10.19.

Is it possible to simply use the hostname of the client to connect?
