The Mysql root user cannot use the grant

Source: Internet
Author: User

Using the root user

Perform:

Grant Select,insert,update,delete on projects.* to ' test ' @ ' percent ' identified by ' test ';

Results:

ERROR 1044 (42000): Access denied for user ' root ' @ '% ' to database ' XXXXX '


Workaround:

User MySQL;

SELECT * from user where user= ' root '

Look at the permission column there is not the option of Y, looked at, Grant_priv not y, decisive update, into Y.

Flush privileges;

Surprised, again execution is still rejected.

Look Back:select * from user where user= ' root ' found there are two of data, where the first data of the host column is a very strange value, regardless of it, directly update to% (all hosts can log in use), and then execute

flush Privileges;

Halo, Grant is still wrong, okay. Restart MySQL

Service MySQL Restart

Yes! This time, good! I'm dizzy!

The Mysql root user cannot use the grant

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.