M
M
Mark Eshkilev2021-08-16 14:56:01
MySQL
Mark Eshkilev, 2021-08-16 14:56:01

What is the purpose of entering a Hostname in mysql user account?

Hello, tell me why you need to enter and what is the host name used in mysql account for? and how can I make it so that only from a certain ip the user can log into the account?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Akina, 2021-08-16
@mark_edinoroglove

A MySQL account name consists of the username and the user's hostname. Both components are required and critical.
Username - set by the user when connecting. The host (name or address) is determined by the MySQL server. independently, and the user has almost no opportunity to influence this process. Combining these two parts will give the fully qualified name that will be used to define the privileges.
In user tables, a host can be specified as a private host or as a template (which matches several different hosts, including a variant that matches any host). There are certain restrictions - it is impossible to connect from some hosts, as well as creating an account with such hosts.
All this is explained in detail in the documentation in the sectionAccess Control and Account Management .

D
Developer, 2021-08-16
@samodum

1. For authentication.
2. Security settings

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question