天天看點

mysql5.7 設定密碼不生效的一種情況

安裝完mysql,使用了各種方法設定root的密碼,均不生效,後來網上看到

mysql5.7 設定密碼不生效的一種情況

plugin字段值是auth_socket,将其改為mysql_native_password即可

mysql.user SET authentication_string=PASSWORD('1q!Qqqqq'), plugin='mysql_native_password' WHERE user='root';