MySQL Error Error 1045 (28000)

Source: Internet
Author: User

Newly installed a MySQL, created a new user dadmin, grant all permission

Mysql>grant all on * * to ' dadmin ' @ ' localhost ' identified by ' 123456 ';


Mysql>drop USER ' root ' @ ' localhost ';

Mysql>drop USER ' root ' @ ' localhost.localdomain ';

Mysql>drop USER ' root ' @ ':: 1 ';

Mysql>drop USER ' root ' @ ' 127.0.0.1 ';


Back just remembered, forgot to give ' dbaadmin ' @ '% ' remote permission, and then start authorizing

Mysql> GRANT All on * * to ' dadmin ' @ ' percent ' identified by ' 123456 ';

ERROR 1045 (28000): Access denied for user ' dadmin ' @ ' localhost ' (using Password:yes)


This problem occurs so that the solution:

Mysql>use MySQL

mysql> Update user Set grant_priv = ' Y ' where user = ' dadmin ';

Query OK, 1 row affected (0.03 sec)

Rows matched:1 changed:1 warnings:0


Mysql> commit;

Query OK, 0 rows Affected (0.00 sec)


mysql> flush Privileges;

Query OK, 0 rows affected (0.02 sec)


Mysql> quit// exit, connect again

Bye

[Email protected] ~]# mysql-udadmin-p

Enter Password:

Welcome to the MySQL Monitor. Commands End With; or \g.

Your MySQL Connection ID is 171

Server Version:5.6.13-log MySQL Community Server (GPL)


Copyright (c) and/or, Oracle, its affiliates. All rights reserved.


Oracle is a registered trademark of the Oracle Corporation and/or its

Affiliates. Other names trademarks of their respective

Owners.


Type ' help ', ' or ' \h ' for help. Type ' \c ' to clear the current input statement.


Mysql> GRANT All on * * to ' dadmin ' @ ' percent ' identified by ' 123456 ';

Query OK, 0 rows affected (0.03 sec)


Mysql> Show grants for ' dbaadmin ' @ '% '; //Authorized Success

+-------------------------------------------------------------------------------------------------------------- ----+

| Grants for [email protected]% |

+-------------------------------------------------------------------------------------------------------------- ----+

| GRANT all privileges on * * to ' dbaadmin ' @ '% ' identified by PASSWORD ' *ed09fa20652595d6114a30c5045a520b8a39839c ' |

+-------------------------------------------------------------------------------------------------------------- ----+

1 row in Set (0.00 sec)


This article is from the "Tiger Shengwei" blog, be sure to keep this source http://tobeone.blog.51cto.com/817917/1579153

MySQL Error Error 1045 (28000)

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.