I have a MySQL installed on my linux server, I forgot it\'s password so I went and changed it using the methods I found on the web. What I did was as follows:
I meet the same problem, @progrAmmar enlightened me, "took a closer look at the user table in mysql database".
My problem is not ssl_type, instead of the first field:Host. I changed the value by using
update user set Host='localhost' where User='root' and Host='%';
in mysqld_safe --skip-grant-tables model.
Then it works well.