Mysql cannot set password

No matter what password you set, it doesn"t work. You can enter any password when you log in.
View and display in mysql as follows:

< table > < thead > < tr > < th > MariaDB [mysql] > select authentication_string from user; < / th > < / tr > < / thead > < tbody > < tr > < td > authentication_string < / td > < / tr > < tr > < td > < / td > < / tr > < / tbody > < / table >

1 row in set (0.00 sec)

< table > < thead > < tr > < th > MariaDB [mysql] > select user from user; < / th > < / tr > < / thead > < tbody > < tr > < td > user < / td > < / tr > < tr > < td > root < / td > < / tr > < / tbody > < / table >

1 row in set (0.00 sec)

< table > < thead > < tr > < th > MariaDB [mysql] > select host from user; < / th > < / tr > < / thead > < tbody > < tr > < td > host < / td > < / tr > < tr > < td > localhost < / td > < / tr > < / tbody > < / table >

1 row in set (0.00 sec)

Jun.02,2021

do you add skip-grant-tables to the my.cnf file and skip the password to log in
(it seems to be my.ini under window)


solved, there is a problem with mysql password authentication.
select Host,User,plugin from mysql.user where User='root';

at this time, you will find that plugin (encryption method) is unix_socket,

update mysql.user set plugin='mysql_native_password';-sharp reset encryption

update mysql.user set password=PASSWORD ("newpassword") where User='root';-sharp set new password

flush privileges;-sharp refresh permission information

then you can use

normally.

try setting password in administrator mode

Menu