This is a very complicated and tiring problem that we all have to face in some point of our life. Someday suddenly, we will not be able to access mysql through phpmyadmin/mysql_workbench. So follow these steps to make it work perfectly:

Steps:
1. open terminal
2. mysql -u root -p (enter)
3. enter your password
4. use mysql;
5. select user, host, plugin from mysql.user;
6.. update user set plugin=’mysql_native_password’ where user=’root’;

7. update user set Password=’Password(‘my_password’) where user=’root’;
or,
update user set authentication_string=password(‘my_password’) where user=’root’;
8. flush privileges;
7. exit;
8. service mysql restart

Nguồn: https://madisonrep.org

Xem thêm bài viết khác: https://madisonrep.org/cong-nghe

15 Comments

stanley Lofa

April 15, 2020

Thanks

Reply

Dmitry Chebotarev

April 15, 2020

10 seconds video and finish! solved!

Reply

Dmitry Chebotarev

April 15, 2020

Perfect! Without water!Short and !

Reply

Nghĩa Vũ Trung

April 15, 2020

Great. Thank you so much.

Reply

kalpana udara

April 15, 2020

thanks a lot..

Reply

IAET IPID

April 15, 2020

Thanks, I am an entry level enthusiast of coding in PHP, and MySQL, it was excessively difficult to find out the solution on my own.

Reply

Adalberto Lima Vitorino

April 15, 2020

Thank you

Reply

vollespfund

April 15, 2020

The best and shortest solution which works like a charm. Thank you!
before setting the password you can check with this command whether you have the field password or the field authentication_string: desc user;

Reply

Steakanemon29

April 15, 2020

<3

Reply

Maria Fantuci

April 15, 2020

thaks, your video helped me too much.

Reply

Miguel Baldé

April 15, 2020

worked perfectly!!! thanks man!

Reply

Shahariar Ryehan

April 15, 2020

you cool man

Reply

Narayan Poudel

April 15, 2020

Thanks bro.

Reply

Luca

April 15, 2020

Perfect!! I had search on web for many solutions, but your solution is the only right!!! Thank you

Reply

Sushil Kumar Verma

April 15, 2020

Thank bro

Reply

Leave a Reply