Access denied for user ' root ' @ ' IP ' (using Password:yes) workaround

Source: Internet
Author: User
Tags deprecated mysql in

In the course of using MySQL, the problem of "Access denied for user ' root ' @ ' IP ' (using Password:yes)" has been modified with the following statement.

GRANT all privileges on * * to ' root ' @ '% ' identified by ' password ' with GRANT OPTION;   
Finally, the following steps can be modified to not error.

1, start → search bar input cmd→ right cmd.exe select Run as Administrator

2. Input net stop MySQL stop MySQL service

3, enter the command line to the MySQL bin directory, enter the following bold command

d:\mysql\bin>mysqld--defaults-file= "d:\mysql\my.ini"--console--skip-grant-tables

  Wait a minute, show the following results illustrate MySQL boot:

170215 22:26:09 [Warning] The syntax '--log ' is deprecated and'll be removed Inmysql 7.0. Please use '--general_log '/'--general_log_file ' instead.
170215 22:26:09 [Warning] The syntax '--log_slow_queries ' is deprecated and'll be removed in MySQL 7.0. Please use '--slow_query_log '/'--slow_query_log_file ' instead.
170215 22:26:09 [Warning] The syntax '--log ' is deprecated and'll be removed in MySQL 7.0. Please use '--general_log '/'--general_log_file ' instead.
170215 22:26:09 [Warning] The syntax '--log_slow_queries ' is deprecated and'll be removed in MySQL 7.0. Please use '--slow_query_log '/'--slow_query_log_file ' instead.
170215 22:26:09 [ERROR] The update log is no longer supported by MySQL in version 5.0 and above. It is replaced by the binary log. Now starting MySQL with--log-bin= ' instead.
170215 22:26:09 innodb:started; Log sequence number 0 324221
170215 22:26:09 [Note] mysqld:ready for connections. Version: ' 5.1.33-community-log ' socket: ' port:3306 MySQL Community Server (GPL)

4, and then as an administrator to open a Cmd.exe, enter the command line to the MySQL bin directory, enter:mysql-uroot mysql

5. After entering MySQL, enter the command line to change the password:

mysql>Update user set Authentication_string=password (' 123456 ') where user= ' root ';

6, Refresh permissions:mysql>flush privileges;

7, quit MySQL:mysql> quit;

Access denied for user ' root ' @ ' IP ' (using Password:yes) workaround

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.