Before modifying the local root user password of the database, I found that the password of the root user of my remote connection did not change, then looked up and found that the original two root is not the same user (Khan. )
So Lenovo to the previous configuration database each time to give the user remote connection permissions, there is a @ip address, so summarizes the next MySQL in the format of the user represents the meaning of
All users in MySQL are in the form of: User name @ user corresponding IP address
Such as:
The root user's account for the machine where MySQL is located should be: [email protected]
And when I need to allow a user to remotely access my database, I need to "create" a remote account,
That is: Grant all privileges on * * to [email protected] identified by "cly934103231";
And to the back of this [email protected] refers to the IP address is 202.115.23.33 root user, this root user and my local root user is not the same
So when we look at the MySQL user, we see "Two Root users":
[Email protected] [Email protected]
They each have their own passwords, which are two different users.
About the user account format in MySQL (or mariadb)