1. 程式人生 > >安裝mysql8.0.11以及修改root密碼,以及navicat連線失敗問題

安裝mysql8.0.11以及修改root密碼,以及navicat連線失敗問題

update mysql.user set authentication_string=”” where user=”root”;
alter user ‘root’@’localhost’ IDENTIFIED BY ‘123456’

修改加密前,authentication_string欄位顯示
+——————+———–+————————————————————————+
| user | host | authentication_string |
+——————+———–+————————————————————————+
| root | localhost |

A005$5-#]j
}Quyowc>TUbR5ItcKagjQi7/3Eqf3JZrOY/Ag6VRS/yZYkFKh2A |

連線失敗是由於加密方式不一樣了。。。

//修改加密方式
ALTER USER ‘root’@’localhost’ IDENTIFIED BY ‘password’ PASSWORD EXPIRE NEVER;
//修改密碼
alter user ‘root’@’localhost’ IDENTIFIED WITH mysql_native_password BY ‘123456’;
//重新整理許可權
FLUSH PRIVILEGES;
修改加密後,authentication_string欄位顯示
+——————+———–+————————————————————————+
| user | host | authentication_string |
+——————+———–+————————————————————————+
| root | localhost | *6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9