MariaDB node replaces client request for host 127.0.0.1 with localhost
1
vote
0
answers
25
views
This seems very strange:
I have a MariaDB Galera cluster with three nodes, and each node has virtually the same configuration.
Since it's a Galera cluster, the database users are the same across all three nodes.
On node 1 and node 2 I get the expected hostname for the user:
mariadb --no-defaults -utheusername -p'thepassword' -h127.0.0.1 -e"select user()"
+-----------------------+
| user() |
+-----------------------+
| theusername@127.0.0.1 |
+-----------------------+
However, on the third node it always ignores the request to use host
127.0.0.1
and replaces this with localhost
:
mariadb --no-defaults -utheusername -p'thepassword' -h127.0.0.1 -e"select user()"
+-----------------------+
| user() |
+-----------------------+
| theusername@localhost |
+-----------------------+
If I instead log in interactively (remove the -e
option) and run the status
command, it shows that the connection is over TCP/IP (not socket although the user's host is still localhost
) on all the nodes:
Connection: 127.0.0.1 via TCP/IP
What could be the reason for this?
Asked by dbdemon
(7029 rep)
Oct 10, 2023, 09:57 AM
Last activity: Oct 10, 2023, 01:18 PM
Last activity: Oct 10, 2023, 01:18 PM