MySQL ERROR 1698 (28000): Access denied for user ' root ' @ ' localhost '

Source: Internet
Author: User

Today in the process of installing MySQL did not let me enter the password, log in and do not need a password to enter, which makes me very confused.

Enter the database to set the password, in a variety of ways are not.

Although I do not have anything in this database, but can not without the password on the naked run ah, a bit embarrassing is it.

Google a bit, found a solution.

See the root of the plugin is Auth_socket

mysql> use MySQL;
mysql> UPDATE user SET plugin= ' mysql_native_password ' WHERE user= ' root ';
mysql> FLUSH privileges;
Mysql> \q Enter

Then enter the Mysql-uroot-p, prompt for the password to enter directly, enter the database, set password= ' YourPassword ';

Complete

Original link: https://stackoverflow.com/questions/39281594/error-1698-28000-access-denied-for-user-rootlocalhost

MySQL ERROR 1698 (28000): Access denied for user ' root ' @ ' localhost '

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.