0

The MariaDB user specifies an allowed IP address in the Host column of the mysql.user table. So, it only allows logging in from the host with the specified IP address. And MySQL has the same design.

We have verified in testing:

With VirtualBox hypervisor, a virtual machine runs on the allowed host, and the VM's Setting has a "NAT" network adaptor for global traffics. So, the MariaDB user account also allows logging in from the VM.

Our Questions:

  • Why does the allowed host IP address of MariaDB user also allow the VM running on the host?

On both the host and the virtual machine, the testing connection client is DBeaver with MariaDB JDBC driver. And we want to better understand the mechanism:

  • How does the MariaDB server get the source IP address of the in-coming login request? Is it a JDBC driver property, or is it from the TCP/IP protocol?

We highly appreciate any hints and suggestions, or any directions on the terminologies to search.


Notes:

I'm setting a "vmware" tag to this question, as "virtualbox" is not available in the choices.

2
  • 2
    You mention NAT, perhaps you may want to research what it is and how it works.
    – mustaccio
    Commented Oct 6, 2023 at 18:10
  • mysql.user.host is not the host where the client is running, this is a host detectd by MySQL. If the client accesses MySQL through NAT then MySQL detects NAT address.
    – Akina
    Commented Oct 6, 2023 at 20:17

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.