About the user account format in MySQL (or mariadb)

Source: Internet
Author: User
Tags mysql in

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)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.