Question
How does MySQL determine if a login is valid?
Answer
MySQL will first determine if a user@host combination exists for the login attempt. For example, let's assume we have the following root MySQL users.
# mysql -e "select user,host from mysql.user where user='root'"
+------+-----------+
| user | host |
+------+-----------+
| root | localhost |
| root | 1.2.3.4. |
+------+-----------+
Under such a configuration, MySQL would refuse logins for the root user from any host except localhost and 1.2.3.4. If a user@host combination exists for the login attempt, MySQL will then proceed to check the password provided. If the password is correct, the login will be allowed. If not, the login will be denied.
Comments
0 comments
Article is closed for comments.