Mysql denied for user & #39; odbc @ localhost & #39; | denied for user & #39; root @ localhost & #39 ;,

Source: Internet
Author: User

Mysql denied for user 'odbc @ localhost' | denied for user 'root @ localhost ',

1. Question Description:

1.1 mysql version: mysql-5.7.11-win64.zip

1.2 if you connect to the mysql service the first time, you may come into SS some problems

1.2.1 mysql-u root-p (enter), no password (enter), you will see

1.2.2 if you want to update the user's password like "update user set password =...", you will see

2. Solution:

2.1 net stop mysql (stop the mysql service)

2.2 mysqld-nt -- skip-grant-tables (you will see cusor is waiting, it's OK ,)

Open another cmd window

2.3 mysql

2.4

Mysql> use mysql

Mysql> update user set password = password ("123456") where user = "root ";

Mysql> flush privileges;

Mysql> exit

2.5 net start mysql

2.6 mysql-u root-p

2.7 set password = password ("123456 ");

3. Thinking

I had meet the problem before, but forget how to set it,

That's mean Writing is better than Minding.

 

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.