[A trap] Mysql Users, permissions, and passwords. (The user you created cannot log on to.) _ MySQL

Source: Internet
Author: User
MysqlVersion: the permissions of users in Mysql56Mysql are related not only to users, but also to user logon passwords. For example, the following statement creates a user createusername @ localhostidentifiedbypassword to authorize Mysql Version: Mysql 5.6.

The user permissions in Mysql are not only related to the user, but also to the user's login password (password.

For example, the following statement:

Create User

Create user 'name' @ 'localhost' identified by 'password '.

Authorization:

Grant all on database. * to username.

Such a statement is denied when you log on to Mysql using name + password.

Good habits should be developed.

Grant all on database. * to username identified by 'password '.

Summary:

In Mysql, user + password is not a unique identifier, and user + password + permission is the unique identifier. any combination of the three is a different record for the user database.

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.