Mysql denied for user 'odbc@localhost' || denied for user 'root@localhost'
Posted rocky-fang
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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 across 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.
以上是关于Mysql denied for user 'odbc@localhost' || denied for user 'root@localhost'的主要内容,如果未能解决你的问题,请参考以下文章
ERROR 1698 (28000): Access denied for user ‘root‘@‘localhost‘解决方法
MySQL:select command denied to user for table ‘proc‘案例
ERROR 1142 (42000): GRANT command denied to user ** 或 ERROR 1045 (28000): Access denied for user
Mysql——ERROR 1045 (28000): Access denied for user 'root'@'localhost'
linux mysql access denied for user ‘root’@’localhost'(using password:YES)
ERROR 1045 (28000): Access denied for user 'root'@'localhost'